summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorPetri Latvala <petri.latvala@intel.com>2018-10-29 16:30:54 +0200
committerPetri Latvala <petri.latvala@intel.com>2018-11-05 14:13:07 +0200
commit7fd5da2567d054d7473b6a46075de9d997a529d2 (patch)
tree9a17f7309826cdedd26e38d5894f33cf7d9125d1 /meson.build
parent49a20d3af0b6df7a4aa223fc54f4f4dfe26306b9 (diff)
meson: Enable more warning flags
We had quite a bit of warning flags active on autotools builds that were not used for meson builds. Add the same flags autotools builds used to what meson was using (some flags autotools didn't have). For the assembler, disable some of the flags to make it build cleanly again. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build44
1 files changed, 39 insertions, 5 deletions
diff --git a/meson.build b/meson.build
index d1e35757..469723dc 100644
--- a/meson.build
+++ b/meson.build
@@ -10,14 +10,48 @@ project('igt-gpu-tools', 'c',
cc = meson.get_compiler('c')
cc_args = [
- '-Wno-unused-parameter',
- '-Wno-sign-compare',
- '-Wno-missing-field-initializers',
+ '-Wbad-function-cast',
+ '-Wdeclaration-after-statement',
+ '-Wformat=2',
+# igt_assert(0) in switch statements triggers a bunch of this.
+ '-Wimplicit-fallthrough=0',
+ '-Wlogical-op',
+ '-Wmissing-declarations',
+ '-Wmissing-format-attribute',
+ '-Wmissing-noreturn',
+ '-Wmissing-prototypes',
+ '-Wnested-externs',
+ '-Wold-style-definition',
+ '-Wpointer-arith',
+ '-Wredundant-decls',
+ '-Wshadow',
+ '-Wstrict-prototypes',
+ '-Wuninitialized',
+ '-Wunused',
+
'-Wno-clobbered',
+ '-Wno-maybe-uninitialized',
+ '-Wno-missing-field-initializers',
+ '-Wno-pointer-arith',
+ '-Wno-sign-compare',
# Macros asserting on the range of their arguments triggers this.
'-Wno-type-limits',
-# igt_assert(0) in switch statements triggers a bunch of this.
- '-Wimplicit-fallthrough=0',
+ '-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',
]
foreach cc_arg : cc_args