summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2016-06-21 14:22:16 +0100
committerDavid Mitchell <davem@iabyn.com>2016-06-21 14:24:17 +0100
commitbf49eae4014ca7ff7b44362d99251f5b9f30bec8 (patch)
tree6bad9b5a17fa5576997a02dd214eacc7a5fc364f /util.c
parent00ac85b948033a963c2554006b5836e7ffb379c9 (diff)
downloadperl-bf49eae4014ca7ff7b44362d99251f5b9f30bec8.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.
Diffstat (limited to 'util.c')
-rw-r--r--util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util.c b/util.c
index 2f788251b4..7748c6c18d 100644
--- a/util.c
+++ b/util.c
@@ -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