Skip to content

Commit

Permalink
Perl_my_vsnprintf: avoid compiler warning
Browse files Browse the repository at this point in the history
in the usequadmath branch, gcc is too clever for its own good:

    PERL_UNUSED_ARG(ap);

gives:

util.c:5299:18: warning: ‘sizeof’ on array function parameter ‘ap’ will
return size of ‘__va_list_tag *’ [-Wsizeof-array-argument]

Stick in a void* cast to shut it up.
  • Loading branch information
iabyn committed Jun 21, 2016
1 parent 00ac85b commit bf49eae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion util.c
Expand Up @@ -5296,7 +5296,8 @@ Perl_my_vsnprintf(char *buffer, const Size_t len, const char *format, va_list ap
PERL_UNUSED_ARG(buffer);
PERL_UNUSED_ARG(len);
PERL_UNUSED_ARG(format);
PERL_UNUSED_ARG(ap);
/* the cast is to avoid gcc -Wsizeof-array-argument complaining */
PERL_UNUSED_ARG((void*)ap);
Perl_croak_nocontext("panic: my_vsnprintf not available with quadmath");
return 0;
#else
Expand Down

0 comments on commit bf49eae

Please sign in to comment.