This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl.h: Move some macro definitions
[perl5.git] / taint.c
diff --git a/taint.c b/taint.c
index e24f4f9..3fc6250 100644 (file)
--- a/taint.c
+++ b/taint.c
@@ -54,12 +54,19 @@ Perl_taint_proper(pTHX_ const char *f, const char *const s)
             ug = " while running with -t switch";
         else
            ug = " while running with -T switch";
+
+        /* XXX because taint_proper adds extra format args, we can't
+         * get the caller to check properly; o we just silence the warning
+         * and hope the callers aren't naughty */
+        GCC_DIAG_IGNORE(-Wformat-nonliteral);
        if (PL_unsafe || TAINT_WARN_get) {
            Perl_ck_warner_d(aTHX_ packWARN(WARN_TAINT), f, s, ug);
         }
         else {
             Perl_croak(aTHX_ f, s, ug);
         }
+        GCC_DIAG_RESTORE;
+
     }
 }