Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information