Mark Wielaard <[email protected]> writes:

> clang 21 doesn't like ommitting a parameter name when not in C23 mode.

One of the things you and I discussed a little while ago ;)

You can use -Wmissing-parameter-name to catch this in GCC, btw.

>
> 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 <[email protected]>
> ---
>  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)
>      {

Attachment: signature.asc
Description: PGP signature

Reply via email to