Suppress -Wsuggest-attribute=format in non-Unicode build

This avoids warnings during allheaders test compilation.
This commit is contained in:
Vadim Zeitlin 2023-05-04 00:50:03 +02:00
parent f5cccfedec
commit 601b4f47cc

View File

@ -286,6 +286,11 @@ wxGCC_ONLY_WARNING_RESTORE(format-nonliteral)
return implA args return implA args
#endif #endif
// In non-Unicode build we get suggestions for using gnu_printf format
// attribute, but it doesn't work in Unicode build, so don't bother with it and
// just disable the warning.
wxGCC_ONLY_WARNING_SUPPRESS(suggest-attribute=format)
inline int inline int
wxVprintf(const wxString& format, va_list ap) wxVprintf(const wxString& format, va_list ap)
{ {
@ -300,6 +305,8 @@ wxVfprintf(FILE *f, const wxString& format, va_list ap)
wxCRT_VfprintfW, wxCRT_VfprintfA); wxCRT_VfprintfW, wxCRT_VfprintfA);
} }
wxGCC_ONLY_WARNING_RESTORE(suggest-attribute=format)
#undef WX_VARARG_VFOO_IMPL #undef WX_VARARG_VFOO_IMPL