Suppress unavoidable -Wformat-literal in wx[F]printf()

Disable gcc format string checks inside these functions.
This commit is contained in:
Vadim Zeitlin 2020-08-30 22:29:17 +02:00
parent 36c5884acb
commit 24914ec7df

View File

@ -276,6 +276,8 @@
#endif
wxGCC_ONLY_WARNING_SUPPRESS(format-nonliteral)
WX_DEFINE_VARARG_FUNC_SANS_N0(int, wxPrintf, 1, (const wxFormatString&),
wxCRT_PrintfNative, wxCRT_PrintfA)
inline int wxPrintf(const wxFormatString& s)
@ -290,6 +292,8 @@ inline int wxFprintf(FILE *f, const wxFormatString& s)
return wxFprintf(f, wxASCII_STR("%s"), s.InputAsString());
}
wxGCC_ONLY_WARNING_RESTORE(format-nonliteral)
// va_list versions of printf functions simply forward to the respective
// CRT function; note that they assume that va_list was created using
// wxArgNormalizer<T>!