]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
stacktrace: fix a C23-ism in sigint_handler
authorMark Wielaard <mark@klomp.org>
Wed, 4 Feb 2026 14:09:06 +0000 (15:09 +0100)
committerMark Wielaard <mark@klomp.org>
Sat, 7 Feb 2026 00:21:02 +0000 (01:21 +0100)
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.

Signed-off-by: Mark Wielaard <mark@klomp.org>
src/stacktrace.c

index c330e64650432d28855d21a968acc22582837dcd..1c9faeeb30591885f8195f8564c3f736ee0f982e 100644 (file)
@@ -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)
     {