Fix -Wunused-value warnings

value computed is not used
left operand of comma operator has no effect
right operand of comma operator has no effect
This commit is contained in:
dhewg 2011-12-02 20:55:32 +01:00 committed by Daniel Gibson
parent 74f7302c71
commit 6ff59d90bf
3 changed files with 8 additions and 7 deletions

View file

@ -7154,15 +7154,16 @@ void idPlayer::UpdateHud( void ) {
if ( inventory.nextItemPickup && gameLocal.time - inventory.nextItemPickup > 2000 ) {
inventory.nextItemNum = 1;
}
int i;
int i, count = 5;
#ifdef _D3XP
int count = 5;
if(gameLocal.isMultiplayer) {
count = 3;
}
if (count < c)
c = count;
#endif
for ( i = 0; i < count, i < c; i++ ) { //_D3XP
for ( i = 0; i < c; i++ ) { //_D3XP
hud->SetStateString( va( "itemtext%i", inventory.nextItemNum ), inventory.pickupItemNames[0].name );
hud->SetStateString( va( "itemicon%i", inventory.nextItemNum ), inventory.pickupItemNames[0].icon );
hud->HandleNamedEvent( va( "itemPickup%i", inventory.nextItemNum++ ) );

View file

@ -6057,7 +6057,7 @@ void idPlayer::UpdateHud( void ) {
inventory.nextItemNum = 1;
}
int i;
for ( i = 0; i < 5, i < c; i++ ) {
for ( i = 0; i < 5 && i < c; i++ ) {
hud->SetStateString( va( "itemtext%i", inventory.nextItemNum ), inventory.pickupItemNames[0].name );
hud->SetStateString( va( "itemicon%i", inventory.nextItemNum ), inventory.pickupItemNames[0].icon );
hud->HandleNamedEvent( va( "itemPickup%i", inventory.nextItemNum++ ) );

View file

@ -7088,7 +7088,7 @@ void idMatX::Eigen_SortIncreasing( idVecX &eigenValues ) {
int i, j, k;
float min;
for ( i = 0, j; i <= numRows - 2; i++ ) {
for ( i = 0; i <= numRows - 2; i++ ) {
j = i;
min = eigenValues[j];
for ( k = i + 1; k < numRows; k++ ) {
@ -7113,7 +7113,7 @@ void idMatX::Eigen_SortDecreasing( idVecX &eigenValues ) {
int i, j, k;
float max;
for ( i = 0, j; i <= numRows - 2; i++ ) {
for ( i = 0; i <= numRows - 2; i++ ) {
j = i;
max = eigenValues[j];
for ( k = i + 1; k < numRows; k++ ) {