mirror of https://github.com/PCSX2/pcsx2.git
cmake: add -Wextra warning on GCC
Add 3 new warnings (first one must be fixed I think) pcsx2/gui/MessageBoxes.cpp: In copy constructor ‘BaseMessageBoxEvent::BaseMessageBoxEvent(const BaseMessageBoxEvent&)’: pcsx2/gui/MessageBoxes.cpp:62:1: warning: base class ‘class pxActionEvent’ should be explicitly initialized in the copy constructor [-Wextra] BaseMessageBoxEvent::BaseMessageBoxEvent( const BaseMessageBoxEvent& event ) plugins/GSdx/GSPng.cpp: In function ‘bool GSPng::SaveFile(const string&, GSPng::Format, uint8*, uint8*, int, int, int, int, bool, bool)’: /home/gregory/playstation/emulateur/pcsx2_merge/plugins/GSdx/GSPng.cpp:64:14: warning: variable ‘success’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered] bool success = false; ^ plugins/GSdx/GSPng.cpp:44:58: warning: argument ‘image’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered] bool SaveFile(const string& file, Format fmt, uint8* image, uint8* row,
This commit is contained in:
parent
24ff2482a4
commit
8fe65ec371
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue