mirror of
https://github.com/dhewm/dhewm3.git
synced 2024-12-18 00:41:36 +00:00
Mark unused variables in a non-debug build as such
Variables which are only used in assert().
This commit is contained in:
parent
541f8f967a
commit
be40e9d661
12 changed files with 29 additions and 29 deletions
|
@ -3111,7 +3111,7 @@ idGameLocal::AddAASObstacle
|
|||
aasHandle_t idGameLocal::AddAASObstacle( const idBounds &bounds ) {
|
||||
int i;
|
||||
aasHandle_t obstacle;
|
||||
aasHandle_t check;
|
||||
aasHandle_t check id_attribute((unused));
|
||||
|
||||
if ( !aasList.Num() ) {
|
||||
return -1;
|
||||
|
|
|
@ -764,7 +764,7 @@ void idGameLocal::ServerProcessEntityNetworkEventQueue( void ) {
|
|||
}
|
||||
}
|
||||
|
||||
entityNetEvent_t* freedEvent = eventQueue.Dequeue();
|
||||
entityNetEvent_t* freedEvent id_attribute((unused)) = eventQueue.Dequeue();
|
||||
assert( freedEvent == 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 );
|
||||
eventQueue.Free( event );
|
||||
}
|
||||
|
|
|
@ -993,7 +993,7 @@ idAFConstraint_UniversalJoint::SetShafts
|
|||
*/
|
||||
void idAFConstraint_UniversalJoint::SetShafts( const idVec3 &cardanShaft1, const idVec3 &cardanShaft2 ) {
|
||||
idVec3 cardanAxis;
|
||||
float l;
|
||||
float l id_attribute((unused));
|
||||
|
||||
shaft1 = cardanShaft1;
|
||||
l = shaft1.Normalize();
|
||||
|
@ -7963,7 +7963,7 @@ idPhysics_AF::ReadFromSnapshot
|
|||
================
|
||||
*/
|
||||
void idPhysics_AF::ReadFromSnapshot( const idBitMsgDelta &msg ) {
|
||||
int i, num;
|
||||
int i, num id_attribute((unused));
|
||||
idCQuat quat;
|
||||
|
||||
current.atRest = msg.ReadLong();
|
||||
|
|
|
@ -1023,7 +1023,7 @@ idPhysics_StaticMulti::ReadFromSnapshot
|
|||
================
|
||||
*/
|
||||
void idPhysics_StaticMulti::ReadFromSnapshot( const idBitMsgDelta &msg ) {
|
||||
int i, num;
|
||||
int i, num id_attribute((unused));
|
||||
idCQuat quat, localQuat;
|
||||
|
||||
num = msg.ReadByte();
|
||||
|
|
|
@ -410,7 +410,7 @@ SetupHuffman
|
|||
================
|
||||
*/
|
||||
void SetupHuffman( void ) {
|
||||
int i, height;
|
||||
int i, height id_attribute((unused));
|
||||
huffmanNode_t *firstNode, *node;
|
||||
huffmanCode_t code;
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ bool idMsgQueue::Get( byte *data, int &size ) {
|
|||
size = 0;
|
||||
return false;
|
||||
}
|
||||
int sequence;
|
||||
int sequence id_attribute((unused));
|
||||
size = ReadShort();
|
||||
sequence = ReadLong();
|
||||
ReadData( data, size );
|
||||
|
|
|
@ -2846,7 +2846,7 @@ idGameLocal::AddAASObstacle
|
|||
aasHandle_t idGameLocal::AddAASObstacle( const idBounds &bounds ) {
|
||||
int i;
|
||||
aasHandle_t obstacle;
|
||||
aasHandle_t check;
|
||||
aasHandle_t check id_attribute((unused));
|
||||
|
||||
if ( !aasList.Num() ) {
|
||||
return -1;
|
||||
|
|
|
@ -750,7 +750,7 @@ void idGameLocal::ServerProcessEntityNetworkEventQueue( void ) {
|
|||
}
|
||||
}
|
||||
|
||||
entityNetEvent_t* freedEvent = eventQueue.Dequeue();
|
||||
entityNetEvent_t* freedEvent id_attribute((unused)) = eventQueue.Dequeue();
|
||||
assert( freedEvent == 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 );
|
||||
eventQueue.Free( event );
|
||||
}
|
||||
|
|
|
@ -993,7 +993,7 @@ idAFConstraint_UniversalJoint::SetShafts
|
|||
*/
|
||||
void idAFConstraint_UniversalJoint::SetShafts( const idVec3 &cardanShaft1, const idVec3 &cardanShaft2 ) {
|
||||
idVec3 cardanAxis;
|
||||
float l;
|
||||
float l id_attribute((unused));
|
||||
|
||||
shaft1 = cardanShaft1;
|
||||
l = shaft1.Normalize();
|
||||
|
@ -7962,7 +7962,7 @@ idPhysics_AF::ReadFromSnapshot
|
|||
================
|
||||
*/
|
||||
void idPhysics_AF::ReadFromSnapshot( const idBitMsgDelta &msg ) {
|
||||
int i, num;
|
||||
int i, num id_attribute((unused));
|
||||
idCQuat quat;
|
||||
|
||||
current.atRest = msg.ReadLong();
|
||||
|
|
|
@ -295,7 +295,7 @@ ID_INLINE idMat2 idMat2::Inverse( void ) const {
|
|||
idMat2 invMat;
|
||||
|
||||
invMat = *this;
|
||||
int r = invMat.InverseSelf();
|
||||
int r id_attribute((unused)) = invMat.InverseSelf();
|
||||
assert( r );
|
||||
return invMat;
|
||||
}
|
||||
|
@ -304,7 +304,7 @@ ID_INLINE idMat2 idMat2::InverseFast( void ) const {
|
|||
idMat2 invMat;
|
||||
|
||||
invMat = *this;
|
||||
int r = invMat.InverseFastSelf();
|
||||
int r id_attribute((unused)) = invMat.InverseFastSelf();
|
||||
assert( r );
|
||||
return invMat;
|
||||
}
|
||||
|
@ -700,7 +700,7 @@ ID_INLINE idMat3 idMat3::Inverse( void ) const {
|
|||
idMat3 invMat;
|
||||
|
||||
invMat = *this;
|
||||
int r = invMat.InverseSelf();
|
||||
int r id_attribute((unused)) = invMat.InverseSelf();
|
||||
assert( r );
|
||||
return invMat;
|
||||
}
|
||||
|
@ -709,7 +709,7 @@ ID_INLINE idMat3 idMat3::InverseFast( void ) const {
|
|||
idMat3 invMat;
|
||||
|
||||
invMat = *this;
|
||||
int r = invMat.InverseFastSelf();
|
||||
int r id_attribute((unused)) = invMat.InverseFastSelf();
|
||||
assert( r );
|
||||
return invMat;
|
||||
}
|
||||
|
@ -1108,7 +1108,7 @@ ID_INLINE idMat4 idMat4::Inverse( void ) const {
|
|||
idMat4 invMat;
|
||||
|
||||
invMat = *this;
|
||||
int r = invMat.InverseSelf();
|
||||
int r id_attribute((unused)) = invMat.InverseSelf();
|
||||
assert( r );
|
||||
return invMat;
|
||||
}
|
||||
|
@ -1117,7 +1117,7 @@ ID_INLINE idMat4 idMat4::InverseFast( void ) const {
|
|||
idMat4 invMat;
|
||||
|
||||
invMat = *this;
|
||||
int r = invMat.InverseFastSelf();
|
||||
int r id_attribute((unused)) = invMat.InverseFastSelf();
|
||||
assert( r );
|
||||
return invMat;
|
||||
}
|
||||
|
@ -1413,7 +1413,7 @@ ID_INLINE idMat5 idMat5::Inverse( void ) const {
|
|||
idMat5 invMat;
|
||||
|
||||
invMat = *this;
|
||||
int r = invMat.InverseSelf();
|
||||
int r id_attribute((unused)) = invMat.InverseSelf();
|
||||
assert( r );
|
||||
return invMat;
|
||||
}
|
||||
|
@ -1422,7 +1422,7 @@ ID_INLINE idMat5 idMat5::InverseFast( void ) const {
|
|||
idMat5 invMat;
|
||||
|
||||
invMat = *this;
|
||||
int r = invMat.InverseFastSelf();
|
||||
int r id_attribute((unused)) = invMat.InverseFastSelf();
|
||||
assert( r );
|
||||
return invMat;
|
||||
}
|
||||
|
@ -1740,7 +1740,7 @@ ID_INLINE idMat6 idMat6::Inverse( void ) const {
|
|||
idMat6 invMat;
|
||||
|
||||
invMat = *this;
|
||||
int r = invMat.InverseSelf();
|
||||
int r id_attribute((unused)) = invMat.InverseSelf();
|
||||
assert( r );
|
||||
return invMat;
|
||||
}
|
||||
|
@ -1749,7 +1749,7 @@ ID_INLINE idMat6 idMat6::InverseFast( void ) const {
|
|||
idMat6 invMat;
|
||||
|
||||
invMat = *this;
|
||||
int r = invMat.InverseFastSelf();
|
||||
int r id_attribute((unused)) = invMat.InverseFastSelf();
|
||||
assert( r );
|
||||
return invMat;
|
||||
}
|
||||
|
@ -2584,7 +2584,7 @@ ID_INLINE idMatX idMatX::Inverse( void ) const {
|
|||
|
||||
invMat.SetTempSize( numRows, numColumns );
|
||||
memcpy( invMat.mat, mat, numRows * numColumns * sizeof( float ) );
|
||||
int r = invMat.InverseSelf();
|
||||
int r id_attribute((unused)) = invMat.InverseSelf();
|
||||
assert( r );
|
||||
return invMat;
|
||||
}
|
||||
|
@ -2620,7 +2620,7 @@ ID_INLINE idMatX idMatX::InverseFast( void ) const {
|
|||
|
||||
invMat.SetTempSize( numRows, numColumns );
|
||||
memcpy( invMat.mat, mat, numRows * numColumns * sizeof( float ) );
|
||||
int r = invMat.InverseFastSelf();
|
||||
int r id_attribute((unused)) = invMat.InverseFastSelf();
|
||||
assert( r );
|
||||
return invMat;
|
||||
}
|
||||
|
|
|
@ -187,7 +187,7 @@ idPolynomial::Test
|
|||
*/
|
||||
void idPolynomial::Test( void ) {
|
||||
int i, num;
|
||||
float roots[4], value;
|
||||
float roots[4], value id_attribute((unused));
|
||||
idComplex complexRoots[4], complexValue;
|
||||
idPolynomial p;
|
||||
|
||||
|
|
|
@ -437,7 +437,7 @@ void R_CheckStaticTriSurfMemory( const srfTriangles_t *tri ) {
|
|||
if ( tri->verts != NULL ) {
|
||||
// R_CreateLightTris points tri->verts at the verts of the ambient surface
|
||||
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 );
|
||||
}
|
||||
}
|
||||
|
@ -446,14 +446,14 @@ void R_CheckStaticTriSurfMemory( const srfTriangles_t *tri ) {
|
|||
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 ( 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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( tri->shadowVertexes != NULL ) {
|
||||
const char *error = triShadowVertexAllocator.CheckMemory( tri->shadowVertexes );
|
||||
const char *error id_attribute((unused)) = triShadowVertexAllocator.CheckMemory( tri->shadowVertexes );
|
||||
assert( error == NULL );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue