mirror of https://github.com/PCSX2/pcsx2.git
zzogl: gcc warning fix
Let's hope variadic macro work on visual cmake: reenable various warning. With previous fixes it just a matter of a couple of warnings
This commit is contained in:
parent
58077c63a7
commit
b7536ca94b
|
@ -91,7 +91,12 @@ set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "")
|
|||
#-------------------------------------------------------------------------------
|
||||
# Set some default compiler flags
|
||||
#-------------------------------------------------------------------------------
|
||||
set(DEFAULT_WARNINGS "-Wno-write-strings -Wno-format -Wno-unused-parameter -Wno-unused-value -Wstrict-aliasing -Wno-unused-function -Wno-attributes -Wno-unused-result -Wno-missing-field-initializers -Wno-unused-local-typedefs -Wno-parentheses")
|
||||
#set(DEFAULT_WARNINGS "-Wno-write-strings -Wno-format -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-parentheses")
|
||||
# -Wno-attributes: "always_inline function might not be inlinable" <= real spam (thousand of warnings!!!)
|
||||
# -Wstrict-aliasing: to fix one day aliasing issue
|
||||
# -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
|
||||
set(DEFAULT_WARNINGS "-Wno-attributes -Wstrict-aliasing -Wno-missing-field-initializers -Wno-unused-function")
|
||||
set(HARDEING_OPT "-D_FORTIFY_SOURCE=2 -Wformat -Wformat-security")
|
||||
set(DEFAULT_GCC_FLAG "-m32 -msse -msse2 -march=i686 -pthread ${DEFAULT_WARNINGS} ${HARDEING_OPT}")
|
||||
if(CMAKE_BUILD_TYPE MATCHES "Debug|Devel")
|
||||
|
|
|
@ -15,9 +15,10 @@ set(CommonFlags
|
|||
-mpreferred-stack-boundary=2
|
||||
-mfpmath=sse
|
||||
#-Wstrict-aliasing # Allow to track strict aliasing issue.
|
||||
-Wunused-variable
|
||||
-std=c++0x
|
||||
-fno-strict-aliasing
|
||||
-Wno-unknown-pragmas
|
||||
-Wno-parentheses
|
||||
)
|
||||
|
||||
set(OptimizationFlags
|
||||
|
@ -32,7 +33,7 @@ endif(CMAKE_BUILD_TYPE STREQUAL Debug)
|
|||
|
||||
# Devel - Build
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Devel)
|
||||
add_definitions(${CommonFlags} ${OptimizationFlags} -D_DEVEL -g -W)
|
||||
add_definitions(${CommonFlags} ${OptimizationFlags} -D_DEVEL -g)
|
||||
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
|
||||
|
||||
# Release - Build
|
||||
|
|
|
@ -81,19 +81,31 @@ void LoadConfig()
|
|||
}
|
||||
|
||||
err = fscanf(f, "interlace = %hhx\n", &conf.interlace);
|
||||
|
||||
if (err != 1) ZZLog::Error_Log("Failed to read zzogl option");
|
||||
err = fscanf(f, "mrtdepth = %hhx\n", &conf.mrtdepth);
|
||||
if (err != 1) ZZLog::Error_Log("Failed to read zzogl option");
|
||||
err = fscanf(f, "zzoptions = %x\n", &conf.zz_options._u32);
|
||||
if (err != 1) ZZLog::Error_Log("Failed to read zzogl option");
|
||||
err = fscanf(f, "options = %x\n", &conf.hacks._u32);
|
||||
if (err != 1) ZZLog::Error_Log("Failed to read zzogl option");
|
||||
err = fscanf(f, "bilinear = %hhx\n", &conf.bilinear);
|
||||
if (err != 1) ZZLog::Error_Log("Failed to read zzogl option");
|
||||
err = fscanf(f, "aliasing = %hhx\n", &conf.aa);
|
||||
if (err != 1) ZZLog::Error_Log("Failed to read zzogl option");
|
||||
err = fscanf(f, "width = %x\n", &conf.width);
|
||||
if (err != 1) ZZLog::Error_Log("Failed to read zzogl option");
|
||||
err = fscanf(f, "height = %x\n", &conf.height);
|
||||
if (err != 1) ZZLog::Error_Log("Failed to read zzogl option");
|
||||
err = fscanf(f, "x = %x\n", &conf.x);
|
||||
if (err != 1) ZZLog::Error_Log("Failed to read zzogl option");
|
||||
err = fscanf(f, "y = %x\n", &conf.y);
|
||||
if (err != 1) ZZLog::Error_Log("Failed to read zzogl option");
|
||||
err = fscanf(f, "log = %x\n", &conf.log);
|
||||
if (err != 1) ZZLog::Error_Log("Failed to read zzogl option");
|
||||
err = fscanf(f, "skipdraw = %x\n", &conf.SkipDraw);
|
||||
if (err != 1) ZZLog::Error_Log("Failed to read zzogl option");
|
||||
err = fscanf(f, "disablehacks = %x\n", &conf.disableHacks);
|
||||
if (err != 1) ZZLog::Error_Log("Failed to read zzogl option");
|
||||
fclose(f);
|
||||
|
||||
// turn off all hacks by default
|
||||
|
|
|
@ -74,7 +74,7 @@ u32 s_uClampData[2] = {0, };
|
|||
#ifdef SPAM_UNUSED_REGISTERS
|
||||
#define REG_LOG ZZLog::Error_Log
|
||||
#else
|
||||
#define REG_LOG 0 &&
|
||||
#define REG_LOG(exp, ...) ((void)0)
|
||||
#endif
|
||||
|
||||
void __gifCall GIFPackedRegHandlerNull(const u32* data)
|
||||
|
|
Loading…
Reference in New Issue