Fixed compiler warning in assertion macro: add explicit braces to avoid dangling else [-Wdangling-else]

Building on Mac OS X 10.8.4, Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)

warning: add explicit braces to avoid dangling else [-Wdangling-else]
  do { if (!(false)) { _SpewInfo( SPEW_ASSERT, "REDACTED/mp/src/tier1/bitbuf.cpp", 372 ); SpewRetval_t ret = _SpewMessage("%s", "Can't get here."); CallAssertFailedNotifyFunc( "REDACTED/mp/src/tier1/bitbuf.cpp", 372, "Can't get here." ); ((void)0); if ( ret == SPEW_DEBUGGER) { if ( !ShouldUseNewAssertDialog() || DoNewAssertDialog( "REDACTED/mp/src/tier1/bitbuf.cpp", 372, "Can't get here." ) ) if ( Plat_IsInDebugSession() ) __asm ( "int $3" ); else { raise(5); }; if ( true ) _ExitOnFatalAssert( "REDACTED/mp/src/tier1/bitbuf.cpp", 372 ); } } } while (0);
Added -Wswitch to suppressed warnings on OS X

Building on Mac OS X 10.8.4, Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)

Example:
REDACTED/mp/src/mathlib/lightdesc.cpp:221:9: warning: enumeration values 'MATERIAL_LIGHT_DISABLE' and 'MATERIAL_LIGHT_DIRECTIONAL' not handled in switch [-Wswitch]
 switch(m_Type)
        ^
Fixed creategameprojects and createallprojects for multiplayer
Fixed compiler warning in ai_networkmanager: format string is not a string literal (potentially insecure) [-Wformat-security]

Building on Mac OS X 10.8.4, Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)

REDACTED/mp/src/game/server/ai_networkmanager.cpp:51:11: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  DevMsg( string );
          ^~~~~~
Fixed compiler warnings in weapon_bugbait: implicit conversion from 'float' to 'byte' (aka 'unsigned char') changes value from <value> to 0 [-Wliteral-conversion]

Fixed under the assumption that the colours should be between 0 and 255 (unsigned char), instead of a float between 0.0 and 0.1 (multiplied value by 255)

Building on Mac OS X 10.8.4, Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)

Example:

REDACTED/mp/src/game/server/hl2/weapon_bugbait.cpp:171:42: warning: implicit conversion from 'float' to 'byte' (aka 'unsigned char') changes value from 0.5 to 0 [-Wliteral-conversion]
  pSporeExplosion->SetRenderColor( 0.0f, 0.5f, 0.25f, 0.15f );
  ~~~~~~~~~~~~~~~                        ^~~~
REDACTED/mp/src/game/server/hl2/weapon_bugbait.cpp:171:48: warning: implicit conversion from 'float' to 'byte' (aka 'unsigned char') changes value from 0.25 to 0 [-Wliteral-conversion]
  pSporeExplosion->SetRenderColor( 0.0f, 0.5f, 0.25f, 0.15f );
  ~~~~~~~~~~~~~~~                              ^~~~~
REDACTED/mp/src/game/server/hl2/weapon_bugbait.cpp:171:55: warning: implicit conversion from 'float' to 'byte' (aka 'unsigned char') changes value from 0.15000001 to 0 [-Wliteral-conversion]
  pSporeExplosion->SetRenderColor( 0.0f, 0.5f, 0.25f, 0.15f );
  ~~~~~~~~~~~~~~~                                     ^~~~~
Fixed compiler warnings in npc_metropolice: implicit conversion from 'float' to 'int' changes value from <value> to <value> [-Wliteral-conversion]

Fixed under the assumption that an array of floats should be an array of floats, and an array of ints would have values declared as ints instead of relying on implicit conversion.

Building on Mac OS X 10.8.4, Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)

REDACTED/mp/src/game/server/hl2/npc_metropolice.cpp:1680:16: warning: implicit conversion from 'float' to 'int' changes value from 2.5 to 2 [-Wliteral-conversion]
 { 3.0f, 3.0f, 2.5f, 1.5f, 1.0f, 0.0f },
 ~             ^~~~
Fixed compiler warning in DebuggerBreak() and DebuggerBreakIfDebugging(): add explicit braces to avoid dangling else [-Wdangling-else]

Building on Mac OS X 10.8.4, Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)

REDACTED/mp/src/game/server/../../public/bone_setup.cpp:60:56: warning: add explicit braces to avoid dangling else [-Wdangling-else]
    if ( Plat_IsInDebugSession() ) __asm ( "int $3" ); else { raise(5); };
Fixed compiler warning in pluginvariant: format string is not a string literal (potentially insecure) [-Wformat-security]

Building on Mac OS X 10.8.4, Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)

In file included from REDACTED/mp/src/utils/serverplugin_sample/serverplugin_empty.cpp:27:
REDACTED/mp/src/public/game/server/pluginvariant.h:59:57: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
 void SetString( char *str ) { V_snprintf(iszVal, 1024, str); fieldType = FIELD_STRING; }
                                                        ^~~
Fixed compiler warning in beam_shared: implicit conversion from 'double' to 'int' changes value from 25.6 to 25 [-Wliteral-conversion]

Fixed on the assumption that a float variable with float getter should also have a float setter, not an int setter.

Building on Mac OS X 10.8.4, Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)

REDACTED/mp/src/game/server/hl2mp/grenade_tripmine.cpp:179:26: warning: implicit conversion from 'double' to 'int' changes value from 25.6 to 25 [-Wliteral-conversion]
 m_pBeam->SetScrollRate( 25.6 );
 ~~~~~~~                 ^~~~
Fixed compiler warning in bone_setup: add explicit braces to avoid dangling else [-Wdangling-else]

Building on Mac OS X 10.8.4, Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)

REDACTED/mp/src/game/server/../../public/bone_setup.cpp:60:60: warning: add explicit braces to avoid dangling else [-Wdangling-else]
    if ( Plat_IsInDebugSession() ) { __asm ( "int $3" ); } else { raise(5); };
                                                           ^
Fixed compiler warnings in voice_status - mismatched format strings [-Wformat]

Building on Mac OS X 10.8.4, Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)

REDACTED/mp/src/game/client/../../game/shared/voice_status.cpp:437:46: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
   Msg("    - m_AudiblePlayers[%d] = %lu\n", dw, m_AudiblePlayers.GetDWord(dw));
                               ~~            ^~
                               %ld
REDACTED/mp/src/game/client/../../game/shared/voice_status.cpp:437:50: warning: format specifies type 'unsigned long' but the argument has type 'uint32' (aka 'unsigned int') [-Wformat]
   Msg("    - m_AudiblePlayers[%d] = %lu\n", dw, m_AudiblePlayers.GetDWord(dw));
                                     ~~~         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                     %u
REDACTED/mp/src/game/client/../../game/shared/voice_status.cpp:438:51: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
   Msg("    - m_ServerBannedPlayers[%d] = %lu\n", dw, m_ServerBannedPlayers.GetDWord(dw));
                                    ~~            ^~
                                    %ld
REDACTED/mp/src/game/client/../../game/shared/voice_status.cpp:438:55: warning: format specifies type 'unsigned long' but the argument has type 'uint32' (aka 'unsigned int') [-Wformat]
   Msg("    - m_ServerBannedPlayers[%d] = %lu\n", dw, m_ServerBannedPlayers.GetDWord(dw));
                                          ~~~         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                          %u
Fixed compiler warning in npc_hunter: initialization of pointer of type 'CBaseEntity *' to null from a constant boolean expression [-Wbool-conversion]

Building on Mac OS X 10.8.4, Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)

REDACTED/sp/src/game/server/episodic/npc_hunter.cpp:6356:9: warning: initialization of pointer of type 'CBaseEntity *' to null from a constant boolean expression [-Wbool-conversion]
 return false;
        ^~~~~
Fixed compiler warning in npc_barnacle: operator '?:' has lower precedence than '+'; '+' will be evaluated first [-Wparentheses]

Fixed order of operations based on code comment: // digest poisonous things for just a moment before being killed by them (it looks wierd if it's instant)

This changes the order of operations.

--

Building on Mac OS X 10.8.4, Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)

REDACTED/sp/src/game/server/hl2/npc_barnacle.cpp:1813:63: warning: operator '?:' has lower precedence than '+'; '+' will be evaluated first [-Wparentheses]
  m_flDigestFinish = gpGlobals->curtime + m_bSwallowingPoison ? 0.48f : 10.0f;
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
REDACTED/sp/src/game/server/hl2/npc_barnacle.cpp:1813:63: note: place parentheses around the '+' expression to silence this warning
  m_flDigestFinish = gpGlobals->curtime + m_bSwallowingPoison ? 0.48f : 10.0f;
                                                              ^
                     (                                       )
REDACTED/sp/src/game/server/hl2/npc_barnacle.cpp:1813:63: note: place parentheses around the '?:' expression to evaluate it first
  m_flDigestFinish = gpGlobals->curtime + m_bSwallowingPoison ? 0.48f : 10.0f;
                                                              ^
                                          (                                  )
Fixed compiler warning in combine_mine: format string is not a string literal (potentially insecure) [-Wformat-security]

This shouldn't be a problem as pszMineStateNames is a hardcoded list of strings (which do not contain string literals), it merely silences the warning.

--

Building on Mac OS X 10.8.4, Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)

REDACTED/mp/src/game/server/hl2/combine_mine.cpp:247:39: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  V_snprintf(tempstr,sizeof(tempstr), pszMineStateNames[m_iMineState] );
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~