Fix some more warnings, Warning about supressed warnings in cmake

This commit is contained in:
Daniel Gibson 2016-04-18 19:10:52 +02:00
parent 5f5106e363
commit 80990f2317
4 changed files with 7 additions and 3 deletions

View File

@ -114,6 +114,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_definitions(-Wno-tautological-undefined-compare) add_definitions(-Wno-tautological-undefined-compare)
add_definitions(-Wno-c++11-compat-deprecated-writable-strings) add_definitions(-Wno-c++11-compat-deprecated-writable-strings)
add_definitions(-Wno-logical-op-parentheses) add_definitions(-Wno-logical-op-parentheses)
MESSAGE(WARNING "reenable -Wlogical-op-parentheses some day!")
endif() endif()
# !!! FIXME: you currently need this, but I'd like to flip this to not use # !!! FIXME: you currently need this, but I'd like to flip this to not use

View File

@ -75,6 +75,7 @@ static __forceinline CTStream &operator>>(CTStream &strm, PCXHeader &t) {
strm>>t.HscreenSize; strm>>t.HscreenSize;
strm>>t.VscreenSize; strm>>t.VscreenSize;
strm.Read_t(t.Filler, sizeof (t.Filler)); strm.Read_t(t.Filler, sizeof (t.Filler));
return strm;
} }
static __forceinline CTStream &operator<<(CTStream &strm, const PCXHeader &t) { static __forceinline CTStream &operator<<(CTStream &strm, const PCXHeader &t) {
@ -96,6 +97,7 @@ static __forceinline CTStream &operator<<(CTStream &strm, const PCXHeader &t) {
strm<<t.HscreenSize; strm<<t.HscreenSize;
strm<<t.VscreenSize; strm<<t.VscreenSize;
strm.Write_t(t.Filler, sizeof (t.Filler)); strm.Write_t(t.Filler, sizeof (t.Filler));
return strm;
} }
// TARGA header structure // TARGA header structure

View File

@ -227,9 +227,10 @@ void CControls::Load_t( CTFileName fnFile)
achrActionName[ 0] = 0; achrActionName[ 0] = 0;
FLOAT fSensitivity = 50; FLOAT fSensitivity = 50;
FLOAT fDeadZone = 0; FLOAT fDeadZone = 0;
// FIXME DG: gcc and clang say the followign has too many arguments for the given format // FIXME DG: if achrIfSmooth should be read, add another %1024s - but it seems like achrIfSmooth
// is unused - below achrIfRelative is compared to "Smooth"?!
sscanf( achrLine, "%*[^\"]\"%1024[^\"]\"%*[^\"]\"%1024[^\"]\" %g %g %1024s %1024s", sscanf( achrLine, "%*[^\"]\"%1024[^\"]\"%*[^\"]\"%1024[^\"]\" %g %g %1024s %1024s",
achrActionName, achrAxis, &fSensitivity, &fDeadZone, achrIfInverted, achrIfRelative, achrIfSmooth); achrActionName, achrAxis, &fSensitivity, &fDeadZone, achrIfInverted, achrIfRelative /*, achrIfSmooth*/);
// find action axis // find action axis
INDEX iActionAxisNo = -1; INDEX iActionAxisNo = -1;
{for( INDEX iAxis=0; iAxis<AXIS_ACTIONS_CT; iAxis++){ {for( INDEX iAxis=0; iAxis<AXIS_ACTIONS_CT; iAxis++){

View File

@ -1187,7 +1187,7 @@ void JoinNetworkGame(void)
_pNetwork->ga_strRequiredMod.ScanF("%250[^\\]\\%s", &strModName, &strModURL); _pNetwork->ga_strRequiredMod.ScanF("%250[^\\]\\%s", &strModName, &strModURL);
_fnmModSelected = CTString(strModName); _fnmModSelected = CTString(strModName);
_strModURLSelected = strModURL; _strModURLSelected = strModURL;
if (_strModURLSelected="") { // FIXME DG: not == ? if (_strModURLSelected=="") {
_strModURLSelected = "http://www.croteam.com/mods/Old"; _strModURLSelected = "http://www.croteam.com/mods/Old";
} }
_strModServerSelected.PrintF("%s:%s", (const char *) _pGame->gam_strJoinAddress, (const char *) _pShell->GetValue("net_iPort")); _strModServerSelected.PrintF("%s:%s", (const char *) _pGame->gam_strJoinAddress, (const char *) _pShell->GetValue("net_iPort"));