From cae05d92f74d46db4cfc19d918a8ad87d19f5dc2 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 5 Sep 2017 14:36:17 +0200 Subject: 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 Acked-by: Jani Nikula Acked-by: Arkadiusz Hiler Acked-by: Petri Latvala Acked-by: Daniel Stone Acked-by: Radoslaw Szwichtenberg Signed-off-by: Daniel Vetter --- meson.build | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'meson.build') 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() -- cgit v1.2.3