From 1a37a80bf627daf234a139b22678005a6fb48d7e Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Fri, 21 Sep 2018 11:37:53 +0100 Subject: [PATCH] meson: make it trivial to add other -Wno-foo CFLAGS Signed-off-by: Eric Engestrom Reviewed-by: Dylan Baker --- meson.build | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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') -- 2.30.2