summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2017-09-05 14:36:17 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2017-09-08 17:06:29 +0200
commitcae05d92f74d46db4cfc19d918a8ad87d19f5dc2 (patch)
treeda0c35fa554a4c582ee9929060d7e1f56ef31ad3
parent92709f0015147daff31a1ad180c72ed81bcdac7f (diff)
meson: Add some compiler flags to reduce warnings.
These warnings are apparently new compared to the autotools build. We can fix the things they complain about later, if we want. Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--meson.build11
1 files changed, 11 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index fee64fcd..4d6985d1 100644
--- a/meson.build
+++ b/meson.build
@@ -8,6 +8,17 @@ project('IGT gpu tests', 'c',
cc = meson.get_compiler('c')
+add_global_arguments('-Wno-unused-parameter', language: 'c')
+add_global_arguments('-Wno-sign-compare', language: 'c')
+add_global_arguments('-Wno-missing-field-initializers', language: 'c')
+add_global_arguments('-Wno-clobbered', language: 'c')
+
+# Macros asserting on the range of their arguments triggers this.
+add_global_arguments('-Wno-type-limits', language: 'c')
+
+# igt_assert(0) in switch statements triggers a bunch of this.
+add_global_arguments('-Wimplicit-fallthrough=0', language: 'c')
+
inc = include_directories('lib', '.')
config_h = configuration_data()