This commit is contained in:
Christoph Oelckers 2016-01-25 18:58:42 +01:00
commit 73ee500bea
4 changed files with 20 additions and 7 deletions

View file

@ -8,7 +8,10 @@ include( CheckCXXCompilerFlag )
set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG -DDEBUGMODE=1" )
if( ZD_CMAKE_COMPILER_IS_GNUC_COMPATIBLE )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-pointer-sign -Wno-uninitialized -Wno-unused-but-set-variable" )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-pointer-sign -Wno-uninitialized" )
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.5")
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-but-set-variable" )
endif(NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.5")
endif( ZD_CMAKE_COMPILER_IS_GNUC_COMPATIBLE )
CHECK_FUNCTION_EXISTS( itoa ITOA_EXISTS )

View file

@ -459,8 +459,12 @@ if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
set( CMAKE_CXX_FLAGS_MINSIZEREL "${REL_CXX_FLAGS} ${CMAKE_CXX_FLAGS_MINSIZEREL}" )
set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${REL_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}" )
set( CMAKE_C_FLAGS "-Wall -Wextra -Wno-unused -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result ${CMAKE_C_FLAGS}" )
set( CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result ${CMAKE_CXX_FLAGS}" )
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.5")
set( CMAKE_C_FLAGS "-Wno-unused-result ${CMAKE_C_FLAGS}" )
set( CMAKE_CXX_FLAGS "-Wno-unused-result ${CMAKE_CXX_FLAGS}" )
endif(NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.5")
set( CMAKE_C_FLAGS "-Wall -Wextra -Wno-unused -Wno-unused-parameter -Wno-missing-field-initializers ${CMAKE_C_FLAGS}" )
set( CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused -Wno-unused-parameter -Wno-missing-field-initializers ${CMAKE_CXX_FLAGS}" )
# Remove extra warnings when using the official DirectX headers.
# Also, TDM-GCC 4.4.0 no longer accepts glibc-style printf formats as valid,

View file

@ -157,8 +157,9 @@ private:
IOHIDElementCookie cookie;
int32_t value;
DigitalButton(const IOHIDElementCookie cookie)
explicit DigitalButton(const IOHIDElementCookie cookie)
: cookie(cookie)
, value(0)
{ }
};

View file

@ -1096,6 +1096,11 @@ void WI_End ()
}
}
bool WI_autoSkip()
{
return wi_autoadvance > 0 && bcnt > (wi_autoadvance * TICRATE);
}
void WI_initNoState ()
{
state = NoState;
@ -1114,7 +1119,7 @@ void WI_updateNoState ()
else
{
bool noauto = noautostartmap;
bool autoskip = (wi_autoadvance > 0 && bcnt > (wi_autoadvance * TICRATE));
bool autoskip = WI_autoSkip();
for (int i = 0; !noauto && i < MAXPLAYERS; ++i)
{
@ -1254,7 +1259,7 @@ void WI_updateDeathmatchStats ()
int i;
bool stillticking;
bool autoskip = (wi_autoadvance > 0 && bcnt > (wi_autoadvance * TICRATE));
bool autoskip = WI_autoSkip();
WI_updateAnimatedBack();
@ -1506,7 +1511,7 @@ void WI_updateNetgameStats ()
int i;
int fsum;
bool stillticking;
bool autoskip = (wi_autoadvance > 0 && bcnt > (wi_autoadvance * TICRATE));
bool autoskip = WI_autoSkip();
WI_updateAnimatedBack ();