Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't turn warnings about variables possibly clobbered by longjmp into errors.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 8 Oct 2012 07:10:24 +0000 (09:10 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 8 Oct 2012 08:30:45 +0000 (10:30 +0200)
Gcc is currently not smart enough and sometimes spits spurious warnings.

buildtools/Cmake/Flags.cmake

index 3fab3f3..b864063 100644 (file)
@@ -10,11 +10,9 @@ else(NOT __VISUALC__ AND NOT __BORLANDC__)
 endif(NOT __VISUALC__ AND NOT __BORLANDC__)
 
 if(enable_compile_warnings)
 endif(NOT __VISUALC__ AND NOT __BORLANDC__)
 
 if(enable_compile_warnings)
-  set(warnCFLAGS "-fno-common -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wclobbered -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing -Wno-format-nonliteral -Werror ")
+  set(warnCFLAGS "-fno-common -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wclobbered -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing -Wno-format-nonliteral -Werror -Wno-error=clobbered ")
   if(COMPILER_C_VERSION_MAJOR_MINOR STRGREATER "4.5")
     set(warnCFLAGS "${warnCFLAGS}-Wno-error=unused-but-set-variable ")
   if(COMPILER_C_VERSION_MAJOR_MINOR STRGREATER "4.5")
     set(warnCFLAGS "${warnCFLAGS}-Wno-error=unused-but-set-variable ")
-  else(COMPILER_C_VERSION_MAJOR_MINOR STRGREATER "4.5")
-    set(warnCFLAGS "${warnCFLAGS}-Wno-error=clobbered ")
   endif(COMPILER_C_VERSION_MAJOR_MINOR STRGREATER "4.5")
 endif(enable_compile_warnings)
 
   endif(COMPILER_C_VERSION_MAJOR_MINOR STRGREATER "4.5")
 endif(enable_compile_warnings)