scons: don't die on warnings in swig-generated code
authorSteve Reinhardt <steve.reinhardt@amd.com>
Wed, 27 Mar 2013 17:03:02 +0000 (10:03 -0700)
committerSteve Reinhardt <steve.reinhardt@amd.com>
Wed, 27 Mar 2013 17:03:02 +0000 (10:03 -0700)
There's not much to do about it other than disable the offending
warning anyway, so it's not worth terminating the build over.

Also suppress uninitialized variable warnings on gcc (happens
at least with gcc 4.4 and swig 1.3.40).

src/SConscript

index 8dccd0900085a0435247bd8d02516c02de47d212..3e9196cd5e7e21cedb8e4804b9106d6bd3bf1cb2 100755 (executable)
@@ -892,7 +892,6 @@ def makeEnv(label, objsfx, strip = False, **kwargs):
     new_env.Append(**kwargs)
 
     swig_env = new_env.Clone()
-    swig_env.Append(CCFLAGS='-Werror')
 
     # Both gcc and clang have issues with unused labels and values in
     # the SWIG generated code
@@ -904,8 +903,10 @@ def makeEnv(label, objsfx, strip = False, **kwargs):
 
     if env['GCC']:
         # Depending on the SWIG version, we also need to supress
-        # warnings about missing field initializers.
-        swig_env.Append(CCFLAGS='-Wno-missing-field-initializers')
+        # warnings about uninitialized variables and missing field
+        # initializers.
+        swig_env.Append(CCFLAGS=['-Wno-uninitialized',
+                                 '-Wno-missing-field-initializers'])
 
         if compareVersions(env['GCC_VERSION'], '4.6') >= 0:
             swig_env.Append(CCFLAGS='-Wno-unused-but-set-variable')