Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Do not hide useful warnings: unused-but-set-variable.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 1 Nov 2011 16:49:52 +0000 (17:49 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 3 Nov 2011 15:19:42 +0000 (16:19 +0100)
Mark them as no-error to avoid to break builds.
For example, some versions of valgrind.h cause a "variable unused but set"
warning in gcc 4.6.

buildtools/Cmake/Flags.cmake

index 51c0ef8..57f3d70 100644 (file)
@@ -14,7 +14,7 @@ if(enable_compile_warnings)
 endif(enable_compile_warnings)
 
 if(COMPILER_C_VERSION_MAJOR_MINOR STRGREATER "4.5")
 endif(enable_compile_warnings)
 
 if(COMPILER_C_VERSION_MAJOR_MINOR STRGREATER "4.5")
-       set(warnCFLAGS "${warnCFLAGS} -Wno-unused-but-set-variable ")
+       set(warnCFLAGS "${warnCFLAGS} -Wno-error=unused-but-set-variable ")
 endif(COMPILER_C_VERSION_MAJOR_MINOR STRGREATER "4.5")
 
 if(enable_compile_optimizations)
 endif(COMPILER_C_VERSION_MAJOR_MINOR STRGREATER "4.5")
 
 if(enable_compile_optimizations)