silence -Wformat-nonliteral in pp_formline
authorDavid Mitchell <davem@iabyn.com>
Sat, 30 Nov 2013 12:20:50 +0000 (12:20 +0000)
committerDavid Mitchell <davem@iabyn.com>
Sat, 30 Nov 2013 12:20:50 +0000 (12:20 +0000)
pp_ctl.c

index 95727f2..7d38bb2 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -838,7 +838,10 @@ PP(pp_formline)
            {
                STORE_NUMERIC_STANDARD_SET_LOCAL();
                arg &= ~(FORM_NUM_POINT|FORM_NUM_BLANK);
+                /* we generate fmt ourselves so it is safe */
+                GCC_DIAG_IGNORE(-Wformat-nonliteral);
                my_snprintf(t, SvLEN(PL_formtarget) - (t - SvPVX(PL_formtarget)), fmt, (int) fieldsize, (int) arg, value);
+                GCC_DIAG_RESTORE;
                RESTORE_NUMERIC_STANDARD();
            }
            t += fieldsize;