diff options
author | David Mitchell <davem@iabyn.com> | 2016-06-21 14:22:16 +0100 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2017-08-23 21:08:34 +0100 |
commit | 432248b02495e4d86c27412a30051b2bea654899 (patch) | |
tree | 43eb619a3032f5e4df913899eae044cd1674c3c6 | |
parent | 2ee27a02f718edea678281f8c9d41917213a838a (diff) | |
download | perl-432248b02495e4d86c27412a30051b2bea654899.tar.gz |
Perl_my_vsnprintf: avoid compiler warning
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.
(cherry picked from commit bf49eae4014ca7ff7b44362d99251f5b9f30bec8)
-rw-r--r-- | util.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -5319,7 +5319,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 |