meson: Add -Wno-format-zero-length for gcc/clang builds

Zero length format strings isn't something that needs to be warned
about.
This commit is contained in:
Martin Storsjö 2020-04-27 16:19:35 +03:00 committed by Philip Withnall
parent acefe859e6
commit 43c826021a

View File

@ -374,6 +374,8 @@ if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
# Due to function casts through (void*) we cannot support -Wpedantic:
# https://wiki.gnome.org/Projects/GLib/CompilerRequirements#Function_pointer_conversions.
'-Wno-pedantic',
# A zero-length format string shouldn't be considered an issue.
'-Wno-format-zero-length',
'-Werror=declaration-after-statement',
'-Werror=format=2',
'-Werror=implicit-function-declaration',