clang build warning fixes
parent
50efcff92e
commit
2295bfe10b
|
@ -172,7 +172,7 @@ int droidReloadBar(BASE_OBJECT *psObj, WEAPON *psWeap, int weapon_slot)
|
|||
firingStage = gameTime - psWeap->lastFired;
|
||||
interval = bSalvo ? weaponReloadTime(psStats, psObj->player) : weaponFirePause(psStats, psObj->player);
|
||||
}
|
||||
if (firingStage < interval)
|
||||
if (firingStage < interval && interval > 0)
|
||||
{
|
||||
return PERCENT(firingStage, interval);
|
||||
}
|
||||
|
|
|
@ -906,7 +906,6 @@ static void intProcessOptions(UDWORD id)
|
|||
int oldSelectedPlayer = selectedPlayer;
|
||||
|
||||
widgSetButtonState(psWScreen, IDOPT_PLAYERSTART + selectedPlayer, 0);
|
||||
oldSelectedPlayer = selectedPlayer;
|
||||
selectedPlayer = id - IDOPT_PLAYERSTART;
|
||||
NetPlay.players[selectedPlayer].allocated = !NetPlay.players[selectedPlayer].allocated;
|
||||
NetPlay.players[oldSelectedPlayer].allocated = !NetPlay.players[oldSelectedPlayer].allocated;
|
||||
|
|
|
@ -476,7 +476,7 @@ static int determineGroundType(int x, int y, const char *tileset)
|
|||
int weight[2][2];
|
||||
int i,j, tile;
|
||||
int a,b, best;
|
||||
MAPTILE *psTile = mapTile(x,y);
|
||||
MAPTILE *psTile;
|
||||
|
||||
if (x < 0 || y < 0 || x >= mapWidth || y >= mapHeight)
|
||||
{
|
||||
|
@ -490,7 +490,7 @@ static int determineGroundType(int x, int y, const char *tileset)
|
|||
{
|
||||
if (x+i-1 < 0 || y+j-1 < 0 || x+i-1 >= mapWidth || y+j-1 >= mapHeight)
|
||||
{
|
||||
psTile = 0;
|
||||
psTile = NULL;
|
||||
tile = 0;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1512,7 +1512,6 @@ bool loadTerrainTable(const char *pFileName)
|
|||
bool loadBodyPropulsionIMDs(const char *pFileName)
|
||||
{
|
||||
BODY_STATS *psBodyStat = asBodyStats;
|
||||
PROPULSION_STATS *psPropulsionStat = asPropulsionStats;
|
||||
unsigned int i, numStats;
|
||||
QString propulsionName, leftIMD, rightIMD;
|
||||
iIMDShape **startIMDs;
|
||||
|
@ -1552,7 +1551,7 @@ bool loadBodyPropulsionIMDs(const char *pFileName)
|
|||
{
|
||||
for (numStats = 0; numStats < numPropulsionStats; numStats++)
|
||||
{
|
||||
psPropulsionStat = &asPropulsionStats[numStats];
|
||||
PROPULSION_STATS *psPropulsionStat = &asPropulsionStats[numStats];
|
||||
if (keys[j].compare(psPropulsionStat->pName) == 0)
|
||||
{
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue