[Intel-gfx] [PATCH i-g-t 15/22] meson: Add some compiler flags to reduce warnings.

Daniel Vetter daniel.vetter at ffwll.ch
Tue Sep 5 12:36:17 UTC 2017


From: Eric Anholt <eric at anholt.net>

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 at anholt.net>
Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
 meson.build | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/meson.build b/meson.build
index fee64fcdf36e..4d6985d191f9 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()
-- 
2.14.1



More information about the Intel-gfx mailing list