[PATCH] stacktrace: fix a C23-ism in sigint_handler
Aaron Merey
amerey@redhat.com
Thu Feb 5 00:05:44 GMT 2026
Hi Mark,
On Wed, Feb 4, 2026 at 9:09 AM Mark Wielaard <mark@klomp.org> wrote:
>
> clang 21 doesn't like ommitting a parameter name when not in C23 mode.
>
> stacktrace.c:1138:44: error: omitting the parameter name in a function definition is a C23 extension [-Werror,-Wc23-extensions]
> 1138 | static void sigint_handler (int /* signo */)
> | ^
> 1 error generated.
>
> * src/stacktrace.c (sigint_handler): Use attribute unused.
This looks obviously correct.
Aaron
>
> Signed-off-by: Mark Wielaard <mark@klomp.org>
> ---
> src/stacktrace.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/stacktrace.c b/src/stacktrace.c
> index c330e6465043..1c9faeeb3059 100644
> --- a/src/stacktrace.c
> +++ b/src/stacktrace.c
> @@ -1135,7 +1135,7 @@ sysprof_unwind_cb (SysprofCaptureFrame *frame, void *arg)
> ****************/
>
> /* Required to match our signal handling with that of a sysprof parent process. */
> -static void sigint_handler (int /* signo */)
> +static void sigint_handler (int signo __attribute__ ((unused)))
> {
> if (signal_count >= 2)
> {
> --
> 2.52.0
>
More information about the Elfutils-devel
mailing list