Skip to content
Permalink
Browse files

misc: fixed some compiler warnings

  • Loading branch information...
saukko28 authored and rmarquis committed May 10, 2019
1 parent 1fccfc3 commit 6becb8d70c6ef3f5f6cd9c452122d345614a47af
@@ -936,11 +936,21 @@ static void CG_DrawWeapRecharge(rectDef_t *rect)
// Draw power bar
switch (cg.snap->ps.stats[STAT_PLAYER_CLASS])
{
case PC_ENGINEER: chargeTime = cg.engineerChargeTime[cg.snap->ps.persistant[PERS_TEAM] - 1]; break;
case PC_MEDIC: chargeTime = cg.medicChargeTime[cg.snap->ps.persistant[PERS_TEAM] - 1]; break;
case PC_FIELDOPS: chargeTime = cg.fieldopsChargeTime[cg.snap->ps.persistant[PERS_TEAM] - 1]; break;
case PC_COVERTOPS: chargeTime = cg.covertopsChargeTime[cg.snap->ps.persistant[PERS_TEAM] - 1]; break;
default: chargeTime = cg.soldierChargeTime[cg.snap->ps.persistant[PERS_TEAM] - 1]; break;
case PC_ENGINEER:
chargeTime = cg.engineerChargeTime[cg.snap->ps.persistant[PERS_TEAM] - 1];
break;
case PC_MEDIC:
chargeTime = cg.medicChargeTime[cg.snap->ps.persistant[PERS_TEAM] - 1];
break;
case PC_FIELDOPS:
chargeTime = cg.fieldopsChargeTime[cg.snap->ps.persistant[PERS_TEAM] - 1];
break;
case PC_COVERTOPS:
chargeTime = cg.covertopsChargeTime[cg.snap->ps.persistant[PERS_TEAM] - 1];
break;
default:
chargeTime = cg.soldierChargeTime[cg.snap->ps.persistant[PERS_TEAM] - 1];
break;
}

// display colored charge bar if charge bar isn't full enough
@@ -342,46 +342,48 @@ pmListItem_t *CG_FindFreePMItem(void)
*/
static qboolean CG_CheckPMItemFilter(popupMessageType_t type)
{
switch (type) {
case PM_CONNECT:
if (cg_popupFilter.integer & POPUP_FILTER_CONNECT)
{
return qtrue;
}
case PM_TEAM:
if (cg_popupFilter.integer & POPUP_FILTER_TEAMJOIN)
{
return qtrue;
}
break;
case PM_MESSAGE:
case PM_DYNAMITE:
case PM_CONSTRUCTION:
case PM_MINES:
case PM_OBJECTIVE:
case PM_DESTRUCTION:
if (cg_popupFilter.integer & POPUP_FILTER_MISSION)
{
return qtrue;
}
break;
case PM_AMMOPICKUP:
case PM_HEALTHPICKUP:
case PM_WEAPONPICKUP:
if (cg_popupFilter.integer & POPUP_FILTER_PICKUP)
{
return qtrue;
}
break;
case PM_DEATH:
if (cg_popupFilter.integer & POPUP_FILTER_DEATH)
{
return qtrue;
}
break;
default:
break;
switch (type)
{
case PM_CONNECT:
if (cg_popupFilter.integer & POPUP_FILTER_CONNECT)
{
return qtrue;
}
case PM_TEAM:
if (cg_popupFilter.integer & POPUP_FILTER_TEAMJOIN)
{
return qtrue;
}
break;
case PM_MESSAGE:
case PM_DYNAMITE:
case PM_CONSTRUCTION:
case PM_MINES:
case PM_OBJECTIVE:
case PM_DESTRUCTION:
if (cg_popupFilter.integer & POPUP_FILTER_MISSION)
{
return qtrue;
}
break;
case PM_AMMOPICKUP:
case PM_HEALTHPICKUP:
case PM_WEAPONPICKUP:
if (cg_popupFilter.integer & POPUP_FILTER_PICKUP)
{
return qtrue;
}
break;
case PM_DEATH:
if (cg_popupFilter.integer & POPUP_FILTER_DEATH)
{
return qtrue;
}
break;
default:
break;
}
return qfalse;
}

/**
@@ -6340,7 +6340,7 @@ int Bot_Interface_Shutdown()

//////////////////////////////////////////////////////////////////////////

void Bot_Interface_ConsoleCommand()
void Bot_Interface_ConsoleCommand(void)
{
enum { BuffSize=32 };
char buffer[BuffSize] = {};
@@ -72,7 +72,7 @@ int Bot_Interface_Shutdown();

void Bot_Interface_Update();

void Bot_Interface_ConsoleCommand();
void Bot_Interface_ConsoleCommand(void);

qboolean Bot_Util_AllowPush(int weaponId);
qboolean Bot_Util_CheckForSuicide(gentity_t *ent);
@@ -860,7 +860,7 @@ void Svcmd_ResetMatch_f(qboolean fDoReset, qboolean fDoRestart)
/**
* @brief Svcmd_ResetMatch
*/
void Svcmd_ResetMatch()
void Svcmd_ResetMatch(void)
{
Svcmd_ResetMatch_f(qtrue, qtrue);
}
@@ -915,15 +915,15 @@ void Svcmd_ShuffleTeamsXP_f(qboolean restart)
/**
* @brief Svcmd_ShuffleTeamsXP
*/
void Svcmd_ShuffleTeamsXP()
void Svcmd_ShuffleTeamsXP(void)
{
Svcmd_ShuffleTeamsXP_f(qtrue);
}

/**
* @brief Svcmd_ShuffleTeamsXPNoRestart
*/
void Svcmd_ShuffleTeamsXPNoRestart()
void Svcmd_ShuffleTeamsXPNoRestart(void)
{
Svcmd_ShuffleTeamsXP_f(qfalse);
}
@@ -958,15 +958,15 @@ void Svcmd_ShuffleTeamsSR_f(qboolean restart)
/**
* @brief Svcmd_ShuffleTeamsSR
*/
void Svcmd_ShuffleTeamsSR()
void Svcmd_ShuffleTeamsSR(void)
{
Svcmd_ShuffleTeamsSR_f(qtrue);
}

/**
* @brief Svcmd_ShuffleTeamsSRPNoRestart
*/
void Svcmd_ShuffleTeamsSRNoRestart()
void Svcmd_ShuffleTeamsSRNoRestart(void)
{
Svcmd_ShuffleTeamsSR_f(qfalse);
}
@@ -1053,7 +1053,7 @@ extern int FindClientByName(const char *name);
* @brief Svcmd_RevivePlayer
* @param[in] name
*/
void Svcmd_RevivePlayer()
void Svcmd_RevivePlayer(void)
{
int clientNum;
gentity_t *player;
@@ -2026,7 +2026,7 @@ void G_UpdateSvCvars(void)
/**
* @brief CC_cvarempty
*/
void CC_cvarempty()
void CC_cvarempty(void)
{
Com_Memset(level.svCvars, 0, sizeof(level.svCvars));
level.svCvarsCount = 0;
@@ -2464,7 +2464,7 @@ void Svcmd_CSInfo_f(void)
/**
* @brief Svcmd_Ref_f
*/
void Svcmd_Ref_f()
void Svcmd_Ref_f(void)
{
char cmd[MAX_TOKEN_CHARS];

@@ -2486,7 +2486,7 @@ void Svcmd_Ref_f()
*
* @todo FIXME this 'say' condition is never reached?!
*/
void Svcmd_Say_f()
void Svcmd_Say_f(void)
{
if (g_dedicated.integer)
{
@@ -2497,7 +2497,7 @@ void Svcmd_Say_f()
/**
* @brief Svcmd_Chat_f
*/
void Svcmd_Chat_f()
void Svcmd_Chat_f(void)
{
if (g_dedicated.integer)
{
@@ -85,6 +85,7 @@

#ifdef _MSC_VER
#pragma warning(disable : 4018) // signed/unsigned mismatch
#pragma warning(disable : 4068) // unknown pragma warning
#pragma warning(disable : 4244) // number conversion (possible loss of data)
#pragma warning(disable : 4305) // truncation from const double to float
#pragma warning(disable : 4711) // selected for automatic inline expansion
@@ -735,7 +735,7 @@ struct
/**
* @brief Prints joystick info to console
*/
void IN_PrintJoystickInfo_f()
void IN_PrintJoystickInfo_f(void)
{
if (!in_joystick->integer)
{
@@ -372,9 +372,9 @@ POParser::parse()
// skip UTF-8 intro that some text editors produce
// see http://en.wikipedia.org/wiki/Byte-order_mark
if (current_line.size() >= 3 &&
current_line[0] == static_cast<char>(0xef) &&
current_line[1] == static_cast<char>(0xbb) &&
current_line[2] == static_cast<char>(0xbf))
current_line[0] == static_cast<unsigned char>(0xef) &&
current_line[1] == static_cast<unsigned char>(0xbb) &&
current_line[2] == static_cast<unsigned char>(0xbf))
{
current_line = current_line.substr(3);
}

0 comments on commit 6becb8d

Please sign in to comment.
You can’t perform that action at this time.