diff mbox

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

Message ID 20170905123624.21315-16-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Vetter Sept. 5, 2017, 12:36 p.m. UTC
From: Eric Anholt <eric@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@anholt.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 meson.build | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff mbox

Patch

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()