From 12eb0343784f52994110df7e7fce4a0b639a6ec3 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Mon, 11 Jan 2016 05:52:20 -0500 Subject: scons: Enable -Wextra by default Make best use of the compiler, and enable -Wextra as well as -Wall. There are a few issues that had to be resolved, but they are all trivial. --- src/SConscript | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'src/SConscript') diff --git a/src/SConscript b/src/SConscript index eae03a98a..322212cb7 100755 --- a/src/SConscript +++ b/src/SConscript @@ -1018,11 +1018,6 @@ def makeEnv(env, label, objsfx, strip = False, **kwargs): # the SWIG generated code swig_env.Append(CCFLAGS=['-Wno-unused-label', '-Wno-unused-value']) - # Add additional warnings here that should not be applied to - # the SWIG generated code - new_env.Append(CXXFLAGS=['-Wmissing-declarations', - '-Wdelete-non-virtual-dtor']) - if env['GCC']: # Depending on the SWIG version, we also need to supress # warnings about uninitialized variables and missing field @@ -1030,7 +1025,8 @@ def makeEnv(env, label, objsfx, strip = False, **kwargs): swig_env.Append(CCFLAGS=['-Wno-uninitialized', '-Wno-missing-field-initializers', '-Wno-unused-but-set-variable', - '-Wno-maybe-uninitialized']) + '-Wno-maybe-uninitialized', + '-Wno-type-limits']) # Only gcc >= 4.9 supports UBSan, so check both the version # and the command-line option before adding the compiler and @@ -1041,13 +1037,9 @@ def makeEnv(env, label, objsfx, strip = False, **kwargs): new_env.Append(LINKFLAGS='-fsanitize=undefined') if env['CLANG']: - swig_env.Append(CCFLAGS=[ - # Some versions of SWIG can return uninitialized values - '-Wno-sometimes-uninitialized', - # Register storage is requested in a lot of places in - # SWIG-generated code. - '-Wno-deprecated-register', - ]) + swig_env.Append(CCFLAGS=['-Wno-sometimes-uninitialized', + '-Wno-deprecated-register', + '-Wno-tautological-compare']) # All supported clang versions have support for UBSan, so if # asked to use it, append the compiler and linker flags. -- cgit v1.2.3