mirror of
https://github.com/dhewm/dhewm3.git
synced 2024-11-27 06:32:27 +00:00
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:
parent
3f5c14ef5f
commit
ee0996e380
4 changed files with 11 additions and 10 deletions
|
@ -7154,15 +7154,16 @@ void idPlayer::UpdateHud( void ) {
|
||||||
if ( inventory.nextItemPickup && gameLocal.time - inventory.nextItemPickup > 2000 ) {
|
if ( inventory.nextItemPickup && gameLocal.time - inventory.nextItemPickup > 2000 ) {
|
||||||
inventory.nextItemNum = 1;
|
inventory.nextItemNum = 1;
|
||||||
}
|
}
|
||||||
int i;
|
int i, count = 5;
|
||||||
|
|
||||||
#ifdef _D3XP
|
#ifdef _D3XP
|
||||||
int count = 5;
|
|
||||||
if(gameLocal.isMultiplayer) {
|
if(gameLocal.isMultiplayer) {
|
||||||
count = 3;
|
count = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (count < c)
|
||||||
|
c = count;
|
||||||
#endif
|
#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( "itemtext%i", inventory.nextItemNum ), inventory.pickupItemNames[0].name );
|
||||||
hud->SetStateString( va( "itemicon%i", inventory.nextItemNum ), inventory.pickupItemNames[0].icon );
|
hud->SetStateString( va( "itemicon%i", inventory.nextItemNum ), inventory.pickupItemNames[0].icon );
|
||||||
hud->HandleNamedEvent( va( "itemPickup%i", inventory.nextItemNum++ ) );
|
hud->HandleNamedEvent( va( "itemPickup%i", inventory.nextItemNum++ ) );
|
||||||
|
|
|
@ -6057,7 +6057,7 @@ void idPlayer::UpdateHud( void ) {
|
||||||
inventory.nextItemNum = 1;
|
inventory.nextItemNum = 1;
|
||||||
}
|
}
|
||||||
int i;
|
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( "itemtext%i", inventory.nextItemNum ), inventory.pickupItemNames[0].name );
|
||||||
hud->SetStateString( va( "itemicon%i", inventory.nextItemNum ), inventory.pickupItemNames[0].icon );
|
hud->SetStateString( va( "itemicon%i", inventory.nextItemNum ), inventory.pickupItemNames[0].icon );
|
||||||
hud->HandleNamedEvent( va( "itemPickup%i", inventory.nextItemNum++ ) );
|
hud->HandleNamedEvent( va( "itemPickup%i", inventory.nextItemNum++ ) );
|
||||||
|
|
|
@ -7088,7 +7088,7 @@ void idMatX::Eigen_SortIncreasing( idVecX &eigenValues ) {
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
float min;
|
float min;
|
||||||
|
|
||||||
for ( i = 0, j; i <= numRows - 2; i++ ) {
|
for ( i = 0; i <= numRows - 2; i++ ) {
|
||||||
j = i;
|
j = i;
|
||||||
min = eigenValues[j];
|
min = eigenValues[j];
|
||||||
for ( k = i + 1; k < numRows; k++ ) {
|
for ( k = i + 1; k < numRows; k++ ) {
|
||||||
|
@ -7113,7 +7113,7 @@ void idMatX::Eigen_SortDecreasing( idVecX &eigenValues ) {
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
float max;
|
float max;
|
||||||
|
|
||||||
for ( i = 0, j; i <= numRows - 2; i++ ) {
|
for ( i = 0; i <= numRows - 2; i++ ) {
|
||||||
j = i;
|
j = i;
|
||||||
max = eigenValues[j];
|
max = eigenValues[j];
|
||||||
for ( k = i + 1; k < numRows; k++ ) {
|
for ( k = i + 1; k < numRows; k++ ) {
|
||||||
|
|
|
@ -1248,7 +1248,7 @@ int sgetI1( unsigned char **bp )
|
||||||
i = **bp;
|
i = **bp;
|
||||||
if ( i > 127 ) i -= 256;
|
if ( i > 127 ) i -= 256;
|
||||||
flen += 1;
|
flen += 1;
|
||||||
*bp++;
|
*bp += 1;
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1286,7 +1286,7 @@ unsigned char sgetU1( unsigned char **bp )
|
||||||
if ( flen == FLEN_ERROR ) return 0;
|
if ( flen == FLEN_ERROR ) return 0;
|
||||||
c = **bp;
|
c = **bp;
|
||||||
flen += 1;
|
flen += 1;
|
||||||
*bp++;
|
*bp += 1;
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1714,7 +1714,7 @@ static int add_clip( char *s, lwClip **clist, int *nclips )
|
||||||
clip->source.still.name = s;
|
clip->source.still.name = s;
|
||||||
}
|
}
|
||||||
|
|
||||||
*nclips++;
|
*nclips += 1;
|
||||||
clip->index = *nclips;
|
clip->index = *nclips;
|
||||||
|
|
||||||
lwListAdd( (void**)clist, clip );
|
lwListAdd( (void**)clist, clip );
|
||||||
|
|
Loading…
Reference in a new issue