summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2018-09-21 11:37:53 +0100
committerEric Engestrom <[email protected]>2018-09-25 11:39:56 +0100
commit1a37a80bf627daf234a139b22678005a6fb48d7e (patch)
tree4378c336d4f37a89a1d3d279ccd3f48cf4604d4e
parentf5b41f9121c340281bf0e11dc8fd0e49d6810259 (diff)
meson: make it trivial to add other -Wno-foo CFLAGS
Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
-rw-r--r--meson.build9
1 files 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')