summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorAshutosh Dixit <ashutosh.dixit@intel.com>2021-01-29 22:44:21 -0800
committerChris Wilson <chris@chris-wilson.co.uk>2021-01-30 14:39:00 +0000
commite02612921a4e95aef3a368e7468f4337c9dcee7d (patch)
tree7b8feaa11b5787c2b78c362222e0e99b30c865e4 /meson.build
parentfdc23507d022b68443121ec2c1a951af27c87240 (diff)
meson: Turn on -Werror
We can choose which compile warnings to enable, but once they are enabled treat all warnings as error. This enforces stricter checks against compile warnings creeping in. v2: Fix redefinition warning errors from i915/gem_userptr_blits v3: Fix the even more pedantic clang compilation v4: Do not alter whitespace in lib/tests/igt_describe! Note: clang does not build assembler/ Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build28
1 files changed, 15 insertions, 13 deletions
diff --git a/meson.build b/meson.build
index f4ee14f1..3f3693f9 100644
--- a/meson.build
+++ b/meson.build
@@ -51,19 +51,21 @@ cc_args = [
'-Wno-unused-parameter',
'-Wno-unused-result',
- '-Werror=address',
- '-Werror=array-bounds',
- '-Werror=implicit',
- '-Werror=init-self',
- '-Werror=int-to-pointer-cast',
- '-Werror=main',
- '-Werror=missing-braces',
- '-Werror=nonnull',
- '-Werror=pointer-to-int-cast',
- '-Werror=return-type',
- '-Werror=sequence-point',
- '-Werror=trigraphs',
- '-Werror=write-strings',
+ '-Waddress',
+ '-Warray-bounds',
+ '-Wimplicit',
+ '-Winit-self',
+ '-Wint-to-pointer-cast',
+ '-Wmain',
+ '-Wmissing-braces',
+ '-Wnonnull',
+ '-Wpointer-to-int-cast',
+ '-Wreturn-type',
+ '-Wsequence-point',
+ '-Wtrigraphs',
+ '-Wwrite-strings',
+
+ '-Werror',
# Disable the memory allocating builtins as they may cause unexpected behavior
# with our framework. They *may* get optimized out in favor of a register or
# stack variable, making them effectively local. Local variables do not play