From: Arnaud Giersch Date: Tue, 1 Nov 2011 16:49:52 +0000 (+0100) Subject: Do not hide useful warnings: unused-but-set-variable. X-Git-Tag: exp_20120216~513 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/e9665319cc0f5ef31b773ca24d1f95d20719742e Do not hide useful warnings: unused-but-set-variable. 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. --- diff --git a/buildtools/Cmake/Flags.cmake b/buildtools/Cmake/Flags.cmake index 51c0ef8d77..57f3d70189 100644 --- a/buildtools/Cmake/Flags.cmake +++ b/buildtools/Cmake/Flags.cmake @@ -14,7 +14,7 @@ if(enable_compile_warnings) 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)