Fix the -Werror=format-nonliteral fixes for older GCCs

They don't allow that pragma inside functions.