swig: Disable unused value warning with llvm 3.1 compilers
authorAndreas Hansson <andreas.hansson@arm.com>
Tue, 28 Aug 2012 18:30:22 +0000 (14:30 -0400)
committerAndreas Hansson <andreas.hansson@arm.com>
Tue, 28 Aug 2012 18:30:22 +0000 (14:30 -0400)
This patch disables a warning for unused values which causes problems
when compiling the swig-generated sources using recent llvm-based
compilers like llvm-gcc and clang.

src/SConscript

index 24d31fccf1f2401117f0e6b094ed9102156cc117..59f185c0d95116d9af32f9d7b829216e84019a5d 100755 (executable)
@@ -850,15 +850,13 @@ def makeEnv(label, objsfx, strip = False, **kwargs):
     swig_env = new_env.Clone()
     swig_env.Append(CCFLAGS='-Werror')
     if env['GCC']:
-        swig_env.Append(CCFLAGS='-Wno-uninitialized')
-        swig_env.Append(CCFLAGS='-Wno-sign-compare')
-        swig_env.Append(CCFLAGS='-Wno-parentheses')
-        swig_env.Append(CCFLAGS='-Wno-unused-label')
+        swig_env.Append(CCFLAGS=['-Wno-uninitialized', '-Wno-sign-compare',
+                                 '-Wno-parentheses', '-Wno-unused-label',
+                                 '-Wno-unused-value'])
         if compareVersions(env['GCC_VERSION'], '4.6') >= 0:
             swig_env.Append(CCFLAGS='-Wno-unused-but-set-variable')
     if env['CLANG']:
-        swig_env.Append(CCFLAGS=['-Wno-unused-label'])
-
+        swig_env.Append(CCFLAGS=['-Wno-unused-label', '-Wno-unused-value'])
 
     werror_env = new_env.Clone()
     werror_env.Append(CCFLAGS='-Werror')