From: Eric Engestrom Date: Fri, 21 Sep 2018 10:37:53 +0000 (+0100) Subject: meson: make it trivial to add other -Wno-foo CFLAGS X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1a37a80bf627daf234a139b22678005a6fb48d7e;p=mesa.git meson: make it trivial to add other -Wno-foo CFLAGS Signed-off-by: Eric Engestrom Reviewed-by: Dylan Baker --- diff --git a/meson.build b/meson.build index d098f96d949..c22ff4d9a8a 100644 --- a/meson.build +++ b/meson.build @@ -789,9 +789,12 @@ foreach a : ['-Wall', '-Werror=implicit-function-declaration', c_args += a endif endforeach -if cc.has_argument('-Wmissing-field-initializers') - c_args += '-Wno-missing-field-initializers' -endif + +foreach a : ['missing-field-initializers'] + if cc.has_argument('-W' + a) + c_args += '-Wno-' + a + endif +endforeach c_vis_args = [] if cc.has_argument('-fvisibility=hidden')