cmake: gcc warning management

* disable unused value warning (don't like the syntax 0&&)
* remove -Wno-ignored-attributes (c option). It replaces gcc warning
    by an unsupported option warning...
This commit is contained in:
Gregory Hainaut 2014-08-02 08:42:28 +02:00
parent 1bb15fd2cc
commit 61088b71c6
2 changed files with 3 additions and 2 deletions

View File

@ -203,7 +203,8 @@ set(HARDENING_FLAG "-D_FORTIFY_SOURCE=2 -Wformat -Wformat-security")
# -Wno-missing-field-initializers: standard allow to init only the begin of struct/array in static init. Just a silly warning.
# -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.
set(DEFAULT_WARNINGS "-Wall -Wno-attributes -Wstrict-aliasing -Wno-missing-field-initializers -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable")
# -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 -Wstrict-aliasing -Wno-missing-field-initializers -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable -Wno-unused-value")
if (USE_CLANG)
# -Wno-deprecated-register: glib issue...

View File

@ -17,7 +17,7 @@ set(CommonFlags
-Wstrict-aliasing # Allow to track strict aliasing issue.
-Wno-char-subscripts # only impact svu which is deprecated
-Wno-missing-braces
-Wno-ignored-attributes
#-Wno-ignored-attributes # don't remember why I put here but it is pure C option, therefore it complains for nothings on cpp files
)
# set optimization flags