- added warnings for gcc for functions that are defined to return a value but they do not

- fixed a few defines that do the above
This commit is contained in:
Mark Vejvoda 2011-01-06 23:31:07 +00:00
parent 055293d027
commit 3e809c8c8e
2 changed files with 7 additions and 4 deletions

View File

@ -32,10 +32,13 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
# Default compiler flags
#SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s") ## Strip binary
# For gcc warning options see: http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
IF(NOT MINGW)
ADD_DEFINITIONS("-fno-strict-aliasing -frounding-math -fsignaling-nans -mfpmath=sse -msse -rdynamic")
# For tons of verbose warnings add: -Wall
ADD_DEFINITIONS("-Wreturn-type -fno-strict-aliasing -frounding-math -fsignaling-nans -mfpmath=sse -msse -rdynamic")
ELSE()
ADD_DEFINITIONS("-fno-strict-aliasing -frounding-math -fsignaling-nans -mfpmath=sse -msse")
ADD_DEFINITIONS("-Wreturn-type -fno-strict-aliasing -frounding-math -fsignaling-nans -mfpmath=sse -msse")
ENDIF()
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")

View File

@ -597,8 +597,8 @@ public:
int getToTeam() const {return data.toTeam;}
string getNetworkPlayerName() const {return data.networkPlayerName.getString(); }
int getSwitchFlags() const {return data.switchFlags;}
int addSwitchFlag(SwitchSetupRequestFlagType flag) { data.switchFlags |= flag;}
int clearSwitchFlag(SwitchSetupRequestFlagType flag) { data.switchFlags &= ~flag;}
void addSwitchFlag(SwitchSetupRequestFlagType flag) { data.switchFlags |= flag;}
void clearSwitchFlag(SwitchSetupRequestFlagType flag) { data.switchFlags &= ~flag;}
virtual bool receive(Socket* socket);
virtual void send(Socket* socket) const;