summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authormarxin <mliska@suse.cz>2019-04-02 21:15:02 +0200
committermarxin <mliska@suse.cz>2019-04-10 09:33:55 +0200
commit4134f9e1613e6fea08b5aedd070e4264965df711 (patch)
tree2dd582ce649d430764b27ba02afe6e88c4fece63 /SConstruct
parent5772f60f960ee8c396574f0c6f94def18bb210c7 (diff)
Add more warnings on top of -Wall and -Wextra.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct11
1 files changed, 9 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct
index 7b2d49e36f..fb36093077 100644
--- a/SConstruct
+++ b/SConstruct
@@ -348,11 +348,18 @@ if selected_platform in platform_list:
if (env["warnings"] == 'extra'):
# FIXME: enable -Wclobbered once #26351 is fixed
+ # FIXME: enable -Wlogical-op and -Wduplicated-branches once #27594 is merged
# Note: enable -Wimplicit-fallthrough for Clang (already part of -Wextra for GCC)
# once we switch to C++11 or later (necessary for our FALLTHROUGH macro).
- env.Append(CCFLAGS=['-Wall', '-Wextra', '-Wno-unused-parameter'] + all_plus_warnings + shadow_local_warning)
+ env.Append(CCFLAGS=['-Wall', '-Wextra', '-Wno-unused-parameter',
+ '-Wctor-dtor-privacy', '-Wnon-virtual-dtor']
+ + all_plus_warnings + shadow_local_warning)
if methods.using_gcc(env):
- env['CCFLAGS'] += ['-Wno-clobbered']
+ env['CCFLAGS'] += ['-Wno-clobbered', '-Walloc-zero', '-Wnoexcept',
+ '-Wduplicated-cond', '-Wplacement-new=1', '-Wstringop-overflow=4']
+ version = methods.get_compiler_version(env)
+ if version != None and version[0] >= '9':
+ env['CCFLAGS'] += ['-Wattribute-alias=2']
elif (env["warnings"] == 'all'):
env.Append(CCFLAGS=['-Wall'] + shadow_local_warning)
elif (env["warnings"] == 'moderate'):