diff options
author | David Robillard <d@drobilla.net> | 2020-07-04 15:50:30 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-07-04 16:36:58 +0200 |
commit | 72ffadb20144304b376cc7fef267aeb9db8171de (patch) | |
tree | b43d1dfae62a27d6e038b0af718f130345a11534 | |
parent | ad471068f63fd886194e1888f7b31e6d8d1b5a06 (diff) | |
download | pugl-72ffadb20144304b376cc7fef267aeb9db8171de.tar.gz pugl-72ffadb20144304b376cc7fef267aeb9db8171de.tar.bz2 pugl-72ffadb20144304b376cc7fef267aeb9db8171de.zip |
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-- | wscript | 24 |
1 files changed, 16 insertions, 8 deletions
@@ -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', { |