aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-07-04 15:50:30 +0200
committerDavid Robillard <d@drobilla.net>2020-07-04 16:36:58 +0200
commit72ffadb20144304b376cc7fef267aeb9db8171de (patch)
treeb43d1dfae62a27d6e038b0af718f130345a11534
parentad471068f63fd886194e1888f7b31e6d8d1b5a06 (diff)
Use more precise warning flags
This only enables warnings for C or C++ as necessary, to minimize the nubmer of suppressed warnings.
-rw-r--r--wscript24
1 files changed, 16 insertions, 8 deletions
diff --git a/wscript b/wscript
index 9315220..7a6071f 100644
--- a/wscript
+++ b/wscript
@@ -64,34 +64,42 @@ def configure(conf):
if Options.options.ultra_strict:
# All warnings enabled by autowaf, disable some we trigger
+
conf.add_compiler_flags('*', {
'clang': [
- '-Wno-bad-function-cast',
- '-Wno-float-equal',
- '-Wno-implicit-fallthrough',
'-Wno-padded',
'-Wno-reserved-id-macro',
'-Wno-switch-enum',
],
'gcc': [
- '-Wno-float-equal',
'-Wno-padded',
'-Wno-switch-default',
'-Wno-switch-enum',
],
'msvc': [
'/wd4061', # enumerator in switch is not explicitly handled
- '/wd4191', # unsafe conversion from type to type
'/wd4514', # unreferenced inline function has been removed
- '/wd4706', # assignment within conditional expression
- '/wd4710', # function not inlined
'/wd4820', # padding added after construct
'/wd5045', # will insert Spectre mitigation for memory load
],
})
conf.add_compiler_flags('c', {
- 'gcc': ['-Wno-bad-function-cast'],
+ 'clang': [
+ '-Wno-bad-function-cast',
+ '-Wno-float-equal',
+ '-Wno-implicit-fallthrough',
+ ],
+ 'gcc': [
+ '-Wno-bad-function-cast',
+ '-Wno-float-equal',
+ ],
+ 'msvc': [
+ '/wd4191', # unsafe conversion from type to type
+ '/wd4706', # assignment within conditional expression
+ '/wd4710', # function not inlined
+ '/wd5045', # will insert Spectre mitigation for memory load
+ ],
})
conf.add_compiler_flags('cxx', {