summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2016-06-21 14:22:16 +0100
committerSteve Hay <steve.m.hay@googlemail.com>2017-08-23 21:08:34 +0100
commit432248b02495e4d86c27412a30051b2bea654899 (patch)
tree43eb619a3032f5e4df913899eae044cd1674c3c6
parent2ee27a02f718edea678281f8c9d41917213a838a (diff)
downloadperl-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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util.c b/util.c
index b64e87dd32..7c3d271f51 100644
--- a/util.c
+++ b/util.c
@@ -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