From d75ef6e9678695260b8dd7aa6394e7972a670f56 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Mon, 8 Oct 2012 09:10:24 +0200 Subject: [PATCH] Don't turn warnings about variables possibly clobbered by longjmp into errors. Gcc is currently not smart enough and sometimes spits spurious warnings. --- buildtools/Cmake/Flags.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/buildtools/Cmake/Flags.cmake b/buildtools/Cmake/Flags.cmake index 3fab3f3cb4..b864063813 100644 --- a/buildtools/Cmake/Flags.cmake +++ b/buildtools/Cmake/Flags.cmake @@ -10,11 +10,9 @@ else(NOT __VISUALC__ AND NOT __BORLANDC__) 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 ") - 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) -- 2.20.1