From dfeee9b153e7ebbeaa1e263dad19a3e5a819bacd Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Thu, 28 Sep 2006 22:15:57 +0000 Subject: [PATCH] Silence two warnings from gcc when being -pedantic p4raw-id: //depot/perl@28899 --- perl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.7.4