From 6b908211e635e70cb62f87d2f5f26ce019bb8b18 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Wed, 13 Aug 2014 06:57:28 -0400 Subject: scons: Silence clang 3.4 warnings on Ubuntu 12.04 This changeset fixes three types of warnings that occur in clang 3.4 on Ubuntu 12.04: * Certain versions of libstdc++ (primarily 4.8) use struct and class interchangeably. This triggers a warning in clang. * Swig has a tendency to generate code with the register class which was deprecated in C++11. This triggers a deprecation warning in clang. * Swig sometimes generates Python wrapper code which returns uninitialized values. It's unclear if this is actually a problem (the cases might be limited to failure paths). We'll silence these warnings for now since there is little we can do about the generated code. --- src/SConscript | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/SConscript') diff --git a/src/SConscript b/src/SConscript index f5b082819..88fedbfdc 100755 --- a/src/SConscript +++ b/src/SConscript @@ -940,6 +940,14 @@ def makeEnv(env, label, objsfx, strip = False, **kwargs): # with non-virtual destructors new_env.Append(CXXFLAGS=['-Wdelete-non-virtual-dtor']) + 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', + ]) + werror_env = new_env.Clone() werror_env.Append(CCFLAGS='-Werror') -- cgit v1.2.3