diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake index f13a8dcdb1..35a12753ad 100644 --- a/cmake/BuildParameters.cmake +++ b/cmake/BuildParameters.cmake @@ -304,10 +304,11 @@ endif() set(HARDENING_FLAG "-D_FORTIFY_SOURCE=2 -Wformat -Wformat-security") # -Wno-attributes: "always_inline function might not be inlinable" <= real spam (thousand of warnings!!!) # -Wno-missing-field-initializers: standard allow to init only the begin of struct/array in static init. Just a silly warning. +# Note: future GCC (aka GCC 5.1.1) has less false positive so warning could maybe put back # -Wno-unused-function: warn for function not used in release build # -Wno-unused-variable: just annoying to manage different level of logging, a couple of extra var won't kill any serious compiler. # -Wno-unused-value: lots of warning for this kind of statements "0 && ...". There are used to disable some parts of code in release/dev build. -set(DEFAULT_WARNINGS "-Wall -Wno-attributes -Wno-missing-field-initializers -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable ") +set(DEFAULT_WARNINGS "-Wall -Wextra -Wno-attributes -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable -Wno-missing-field-initializers ") if (NOT USE_ICC) set(DEFAULT_WARNINGS "${DEFAULT_WARNINGS} -Wno-unused-value ") endif() @@ -316,7 +317,7 @@ endif() if (USE_ICC) set(AGGRESSIVE_WARNING "-Wstrict-aliasing ") else() - set(AGGRESSIVE_WARNING "-Wstrict-aliasing -Wstrict-overflow=2 ") + set(AGGRESSIVE_WARNING "-Wstrict-aliasing -Wstrict-overflow=1 ") endif() if (USE_CLANG)