Mark unused variables in a non-debug build as such

Variables which are only used in assert().
This commit is contained in:
dhewg 2011-12-06 19:13:18 +01:00
parent 541f8f967a
commit be40e9d661
12 changed files with 29 additions and 29 deletions

View file

@ -3111,7 +3111,7 @@ idGameLocal::AddAASObstacle
aasHandle_t idGameLocal::AddAASObstacle( const idBounds &bounds ) { aasHandle_t idGameLocal::AddAASObstacle( const idBounds &bounds ) {
int i; int i;
aasHandle_t obstacle; aasHandle_t obstacle;
aasHandle_t check; aasHandle_t check id_attribute((unused));
if ( !aasList.Num() ) { if ( !aasList.Num() ) {
return -1; return -1;

View file

@ -764,7 +764,7 @@ void idGameLocal::ServerProcessEntityNetworkEventQueue( void ) {
} }
} }
entityNetEvent_t* freedEvent = eventQueue.Dequeue(); entityNetEvent_t* freedEvent id_attribute((unused)) = eventQueue.Dequeue();
assert( freedEvent == event ); assert( freedEvent == event );
eventQueue.Free( event ); eventQueue.Free( event );
} }
@ -1312,7 +1312,7 @@ void idGameLocal::ClientProcessEntityNetworkEventQueue( void ) {
} }
} }
entityNetEvent_t* freedEvent = eventQueue.Dequeue(); entityNetEvent_t* freedEvent id_attribute((unused)) = eventQueue.Dequeue();
assert( freedEvent == event ); assert( freedEvent == event );
eventQueue.Free( event ); eventQueue.Free( event );
} }

View file

@ -993,7 +993,7 @@ idAFConstraint_UniversalJoint::SetShafts
*/ */
void idAFConstraint_UniversalJoint::SetShafts( const idVec3 &cardanShaft1, const idVec3 &cardanShaft2 ) { void idAFConstraint_UniversalJoint::SetShafts( const idVec3 &cardanShaft1, const idVec3 &cardanShaft2 ) {
idVec3 cardanAxis; idVec3 cardanAxis;
float l; float l id_attribute((unused));
shaft1 = cardanShaft1; shaft1 = cardanShaft1;
l = shaft1.Normalize(); l = shaft1.Normalize();
@ -7963,7 +7963,7 @@ idPhysics_AF::ReadFromSnapshot
================ ================
*/ */
void idPhysics_AF::ReadFromSnapshot( const idBitMsgDelta &msg ) { void idPhysics_AF::ReadFromSnapshot( const idBitMsgDelta &msg ) {
int i, num; int i, num id_attribute((unused));
idCQuat quat; idCQuat quat;
current.atRest = msg.ReadLong(); current.atRest = msg.ReadLong();

View file

@ -1023,7 +1023,7 @@ idPhysics_StaticMulti::ReadFromSnapshot
================ ================
*/ */
void idPhysics_StaticMulti::ReadFromSnapshot( const idBitMsgDelta &msg ) { void idPhysics_StaticMulti::ReadFromSnapshot( const idBitMsgDelta &msg ) {
int i, num; int i, num id_attribute((unused));
idCQuat quat, localQuat; idCQuat quat, localQuat;
num = msg.ReadByte(); num = msg.ReadByte();

View file

@ -410,7 +410,7 @@ SetupHuffman
================ ================
*/ */
void SetupHuffman( void ) { void SetupHuffman( void ) {
int i, height; int i, height id_attribute((unused));
huffmanNode_t *firstNode, *node; huffmanNode_t *firstNode, *node;
huffmanCode_t code; huffmanCode_t code;

View file

@ -101,7 +101,7 @@ bool idMsgQueue::Get( byte *data, int &size ) {
size = 0; size = 0;
return false; return false;
} }
int sequence; int sequence id_attribute((unused));
size = ReadShort(); size = ReadShort();
sequence = ReadLong(); sequence = ReadLong();
ReadData( data, size ); ReadData( data, size );

View file

@ -2846,7 +2846,7 @@ idGameLocal::AddAASObstacle
aasHandle_t idGameLocal::AddAASObstacle( const idBounds &bounds ) { aasHandle_t idGameLocal::AddAASObstacle( const idBounds &bounds ) {
int i; int i;
aasHandle_t obstacle; aasHandle_t obstacle;
aasHandle_t check; aasHandle_t check id_attribute((unused));
if ( !aasList.Num() ) { if ( !aasList.Num() ) {
return -1; return -1;

View file

@ -750,7 +750,7 @@ void idGameLocal::ServerProcessEntityNetworkEventQueue( void ) {
} }
} }
entityNetEvent_t* freedEvent = eventQueue.Dequeue(); entityNetEvent_t* freedEvent id_attribute((unused)) = eventQueue.Dequeue();
assert( freedEvent == event ); assert( freedEvent == event );
eventQueue.Free( event ); eventQueue.Free( event );
} }
@ -1280,7 +1280,7 @@ void idGameLocal::ClientProcessEntityNetworkEventQueue( void ) {
} }
} }
entityNetEvent_t* freedEvent = eventQueue.Dequeue(); entityNetEvent_t* freedEvent id_attribute((unused)) = eventQueue.Dequeue();
assert( freedEvent == event ); assert( freedEvent == event );
eventQueue.Free( event ); eventQueue.Free( event );
} }

View file

@ -993,7 +993,7 @@ idAFConstraint_UniversalJoint::SetShafts
*/ */
void idAFConstraint_UniversalJoint::SetShafts( const idVec3 &cardanShaft1, const idVec3 &cardanShaft2 ) { void idAFConstraint_UniversalJoint::SetShafts( const idVec3 &cardanShaft1, const idVec3 &cardanShaft2 ) {
idVec3 cardanAxis; idVec3 cardanAxis;
float l; float l id_attribute((unused));
shaft1 = cardanShaft1; shaft1 = cardanShaft1;
l = shaft1.Normalize(); l = shaft1.Normalize();
@ -7962,7 +7962,7 @@ idPhysics_AF::ReadFromSnapshot
================ ================
*/ */
void idPhysics_AF::ReadFromSnapshot( const idBitMsgDelta &msg ) { void idPhysics_AF::ReadFromSnapshot( const idBitMsgDelta &msg ) {
int i, num; int i, num id_attribute((unused));
idCQuat quat; idCQuat quat;
current.atRest = msg.ReadLong(); current.atRest = msg.ReadLong();

View file

@ -295,7 +295,7 @@ ID_INLINE idMat2 idMat2::Inverse( void ) const {
idMat2 invMat; idMat2 invMat;
invMat = *this; invMat = *this;
int r = invMat.InverseSelf(); int r id_attribute((unused)) = invMat.InverseSelf();
assert( r ); assert( r );
return invMat; return invMat;
} }
@ -304,7 +304,7 @@ ID_INLINE idMat2 idMat2::InverseFast( void ) const {
idMat2 invMat; idMat2 invMat;
invMat = *this; invMat = *this;
int r = invMat.InverseFastSelf(); int r id_attribute((unused)) = invMat.InverseFastSelf();
assert( r ); assert( r );
return invMat; return invMat;
} }
@ -700,7 +700,7 @@ ID_INLINE idMat3 idMat3::Inverse( void ) const {
idMat3 invMat; idMat3 invMat;
invMat = *this; invMat = *this;
int r = invMat.InverseSelf(); int r id_attribute((unused)) = invMat.InverseSelf();
assert( r ); assert( r );
return invMat; return invMat;
} }
@ -709,7 +709,7 @@ ID_INLINE idMat3 idMat3::InverseFast( void ) const {
idMat3 invMat; idMat3 invMat;
invMat = *this; invMat = *this;
int r = invMat.InverseFastSelf(); int r id_attribute((unused)) = invMat.InverseFastSelf();
assert( r ); assert( r );
return invMat; return invMat;
} }
@ -1108,7 +1108,7 @@ ID_INLINE idMat4 idMat4::Inverse( void ) const {
idMat4 invMat; idMat4 invMat;
invMat = *this; invMat = *this;
int r = invMat.InverseSelf(); int r id_attribute((unused)) = invMat.InverseSelf();
assert( r ); assert( r );
return invMat; return invMat;
} }
@ -1117,7 +1117,7 @@ ID_INLINE idMat4 idMat4::InverseFast( void ) const {
idMat4 invMat; idMat4 invMat;
invMat = *this; invMat = *this;
int r = invMat.InverseFastSelf(); int r id_attribute((unused)) = invMat.InverseFastSelf();
assert( r ); assert( r );
return invMat; return invMat;
} }
@ -1413,7 +1413,7 @@ ID_INLINE idMat5 idMat5::Inverse( void ) const {
idMat5 invMat; idMat5 invMat;
invMat = *this; invMat = *this;
int r = invMat.InverseSelf(); int r id_attribute((unused)) = invMat.InverseSelf();
assert( r ); assert( r );
return invMat; return invMat;
} }
@ -1422,7 +1422,7 @@ ID_INLINE idMat5 idMat5::InverseFast( void ) const {
idMat5 invMat; idMat5 invMat;
invMat = *this; invMat = *this;
int r = invMat.InverseFastSelf(); int r id_attribute((unused)) = invMat.InverseFastSelf();
assert( r ); assert( r );
return invMat; return invMat;
} }
@ -1740,7 +1740,7 @@ ID_INLINE idMat6 idMat6::Inverse( void ) const {
idMat6 invMat; idMat6 invMat;
invMat = *this; invMat = *this;
int r = invMat.InverseSelf(); int r id_attribute((unused)) = invMat.InverseSelf();
assert( r ); assert( r );
return invMat; return invMat;
} }
@ -1749,7 +1749,7 @@ ID_INLINE idMat6 idMat6::InverseFast( void ) const {
idMat6 invMat; idMat6 invMat;
invMat = *this; invMat = *this;
int r = invMat.InverseFastSelf(); int r id_attribute((unused)) = invMat.InverseFastSelf();
assert( r ); assert( r );
return invMat; return invMat;
} }
@ -2584,7 +2584,7 @@ ID_INLINE idMatX idMatX::Inverse( void ) const {
invMat.SetTempSize( numRows, numColumns ); invMat.SetTempSize( numRows, numColumns );
memcpy( invMat.mat, mat, numRows * numColumns * sizeof( float ) ); memcpy( invMat.mat, mat, numRows * numColumns * sizeof( float ) );
int r = invMat.InverseSelf(); int r id_attribute((unused)) = invMat.InverseSelf();
assert( r ); assert( r );
return invMat; return invMat;
} }
@ -2620,7 +2620,7 @@ ID_INLINE idMatX idMatX::InverseFast( void ) const {
invMat.SetTempSize( numRows, numColumns ); invMat.SetTempSize( numRows, numColumns );
memcpy( invMat.mat, mat, numRows * numColumns * sizeof( float ) ); memcpy( invMat.mat, mat, numRows * numColumns * sizeof( float ) );
int r = invMat.InverseFastSelf(); int r id_attribute((unused)) = invMat.InverseFastSelf();
assert( r ); assert( r );
return invMat; return invMat;
} }

View file

@ -187,7 +187,7 @@ idPolynomial::Test
*/ */
void idPolynomial::Test( void ) { void idPolynomial::Test( void ) {
int i, num; int i, num;
float roots[4], value; float roots[4], value id_attribute((unused));
idComplex complexRoots[4], complexValue; idComplex complexRoots[4], complexValue;
idPolynomial p; idPolynomial p;

View file

@ -437,7 +437,7 @@ void R_CheckStaticTriSurfMemory( const srfTriangles_t *tri ) {
if ( tri->verts != NULL ) { if ( tri->verts != NULL ) {
// R_CreateLightTris points tri->verts at the verts of the ambient surface // R_CreateLightTris points tri->verts at the verts of the ambient surface
if ( tri->ambientSurface == NULL || tri->verts != tri->ambientSurface->verts ) { if ( tri->ambientSurface == NULL || tri->verts != tri->ambientSurface->verts ) {
const char *error = triVertexAllocator.CheckMemory( tri->verts ); const char *error id_attribute((unused)) = triVertexAllocator.CheckMemory( tri->verts );
assert( error == NULL ); assert( error == NULL );
} }
} }
@ -446,14 +446,14 @@ void R_CheckStaticTriSurfMemory( const srfTriangles_t *tri ) {
if ( tri->indexes != NULL ) { if ( tri->indexes != NULL ) {
// if a surface is completely inside a light volume R_CreateLightTris points tri->indexes at the indexes of the ambient surface // if a surface is completely inside a light volume R_CreateLightTris points tri->indexes at the indexes of the ambient surface
if ( tri->ambientSurface == NULL || tri->indexes != tri->ambientSurface->indexes ) { if ( tri->ambientSurface == NULL || tri->indexes != tri->ambientSurface->indexes ) {
const char *error = triIndexAllocator.CheckMemory( tri->indexes ); const char *error id_attribute((unused)) = triIndexAllocator.CheckMemory( tri->indexes );
assert( error == NULL ); assert( error == NULL );
} }
} }
} }
if ( tri->shadowVertexes != NULL ) { if ( tri->shadowVertexes != NULL ) {
const char *error = triShadowVertexAllocator.CheckMemory( tri->shadowVertexes ); const char *error id_attribute((unused)) = triShadowVertexAllocator.CheckMemory( tri->shadowVertexes );
assert( error == NULL ); assert( error == NULL );
} }
} }