You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
toggle_locale_i: eliminate NULL for %s format warning
The C99 printf() family of functions do not permit a NULL
pointer for the %s format specifier.
In this case, there's a NULL check done immediately afterwards,
allowing the compiler to detect that locale_to_restore_to could
be NULL.
While PerlIO_printf() (via sv_vcatpvfn_flags()) does allow NULL,
it isn't permitted by the standard implementation, so gcc warns.
Ideally the compiler would provide customisation hooks for this
warning, but it doesn't, and since the -Wformat family of
warnings are useful, do the minimal change to prevent it in
this case.
0 commit comments