From: Nicholas Clark Date: Thu, 28 Sep 2006 22:15:57 +0000 (+0000) Subject: Silence two warnings from gcc when being -pedantic X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dfeee9b153e7ebbeaa1e263dad19a3e5a819bacd;p=p5sagit%2Fp5-mst-13.2.git Silence two warnings from gcc when being -pedantic p4raw-id: //depot/perl@28899 --- diff --git a/perl.h b/perl.h index b4cd6fe..81cf565 100644 --- a/perl.h +++ b/perl.h @@ -1492,7 +1492,7 @@ EXTERN_C char **environ; * that should be true only if the snprintf()/vsnprintf() are true * to the standard. */ -#if defined(HAS_SNPRINTF) && defined(HAS_C99_VARIADIC_MACROS) && !(defined(DEBUGGING) && !defined(PERL_USE_GCC_BRACE_GROUPS)) +#if defined(HAS_SNPRINTF) && defined(HAS_C99_VARIADIC_MACROS) && !(defined(DEBUGGING) && !defined(PERL_USE_GCC_BRACE_GROUPS)) && !defined(PERL_GCC_PEDANTIC) # ifdef PERL_USE_GCC_BRACE_GROUPS # define my_snprintf(buffer, len, ...) ({ int __len__ = snprintf(buffer, len, __VA_ARGS__); if ((len) > 0 && (Size_t)__len__ >= (len)) Perl_croak(aTHX_ "panic: snprintf buffer overflow"); __len__; }) # define PERL_MY_SNPRINTF_GUARDED @@ -1504,7 +1504,7 @@ EXTERN_C char **environ; # define PERL_MY_SNPRINTF_GUARDED #endif -#if defined(HAS_VSNPRINTF) && defined(HAS_C99_VARIADIC_MACROS) && !(defined(DEBUGGING) && !defined(PERL_USE_GCC_BRACE_GROUPS)) +#if defined(HAS_VSNPRINTF) && defined(HAS_C99_VARIADIC_MACROS) && !(defined(DEBUGGING) && !defined(PERL_USE_GCC_BRACE_GROUPS)) && !defined(PERL_GCC_PEDANTIC) # ifdef PERL_USE_GCC_BRACE_GROUPS # define my_vsnprintf(buffer, len, ...) ({ int __len__ = vsnprintf(buffer, len, __VA_ARGS__); if ((len) > 0 && (Size_t)__len__ >= (len)) Perl_croak(aTHX_ "panic: vsnprintf buffer overflow"); __len__; }) # define PERL_MY_VSNPRINTF_GUARDED