Skip to content

Commit

Permalink
Fix some compiler warnings
Browse files Browse the repository at this point in the history
Mostly unused variables
  • Loading branch information
SomaZ committed Apr 4, 2024
1 parent e996441 commit 5577c98
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 13 deletions.
11 changes: 6 additions & 5 deletions code/rd-rend2/tr_init.cpp
Expand Up @@ -1122,17 +1122,18 @@ RB_TakeVideoFrameCmd
const void *RB_TakeVideoFrameCmd( const void *data )
{
const videoFrameCommand_t *cmd;
byte *cBuf;
size_t memcount, linelen;
int padwidth, avipadwidth, padlen, avipadlen;
GLint packAlign;


// finish any 2D drawing if needed
if (tess.numIndexes)
RB_EndSurface();

cmd = (const videoFrameCommand_t *)data;
#ifndef REND2_SP
byte *cBuf;
size_t memcount, linelen;
int padwidth, avipadwidth, padlen, avipadlen;
GLint packAlign;

qglGetIntegerv(GL_PACK_ALIGNMENT, &packAlign);

linelen = cmd->width * 3;
Expand Down
3 changes: 2 additions & 1 deletion shared/rd-rend2/tr_animation.cpp
Expand Up @@ -136,7 +136,7 @@ R_MDRComputeFogNum
*/

int R_MDRComputeFogNum( mdrHeader_t *header, trRefEntity_t *ent ) {
int i, j;
int i;
float frameRadius;
fog_t *fog;
mdrFrame_t *mdrFrame;
Expand All @@ -154,6 +154,7 @@ int R_MDRComputeFogNum( mdrHeader_t *header, trRefEntity_t *ent ) {
VectorAdd( ent->e.origin, mdrFrame->localOrigin, localOrigin );
frameRadius = mdrFrame->radius;
#ifndef REND2_SP
int j;
for (i = 1; i < tr.world->numfogs; i++) {
fog = &tr.world->fogs[i];
for (j = 0; j < 3; j++) {
Expand Down
4 changes: 2 additions & 2 deletions shared/rd-rend2/tr_backend.cpp
Expand Up @@ -2139,7 +2139,7 @@ static void RB_RenderMainPass( drawSurf_t *drawSurfs, int numDrawSurfs )

if (r_drawSun->integer)
{
RB_DrawSun(0.1, tr.sunShader);
RB_DrawSun(0.1f, tr.sunShader);
}

if (r_drawSunRays->integer)
Expand All @@ -2153,7 +2153,7 @@ static void RB_RenderMainPass( drawSurf_t *drawSurfs, int numDrawSurfs )
tr.sunFlareQueryActive[tr.sunFlareQueryIndex] = qtrue;
qglBeginQuery(GL_SAMPLES_PASSED, tr.sunFlareQuery[tr.sunFlareQueryIndex]);

RB_DrawSun(0.3, tr.sunFlareShader);
RB_DrawSun(0.3f, tr.sunFlareShader);

qglEndQuery(GL_SAMPLES_PASSED);

Expand Down
1 change: 1 addition & 0 deletions shared/rd-rend2/tr_cache.cpp
Expand Up @@ -185,6 +185,7 @@ void CModelCacheManager::DumpNonPure( void )
int iInPak = ri.FS_FileIsInPAK( it->path, &iChecksum );
#else
int iInPak = ri.FS_FileIsInPAK(it->path);
iChecksum = it->iPAKChecksum;
#endif

if( iInPak == -1 || iChecksum != it->iPAKChecksum )
Expand Down
3 changes: 2 additions & 1 deletion shared/rd-rend2/tr_ghoul2.cpp
Expand Up @@ -925,7 +925,7 @@ R_AComputeFogNum
*/
static int R_GComputeFogNum( trRefEntity_t *ent ) {

int i, j;
int i;
float frameRadius;
fog_t *fog;
vec3_t localOrigin;
Expand All @@ -937,6 +937,7 @@ static int R_GComputeFogNum( trRefEntity_t *ent ) {
VectorCopy(ent->e.origin, localOrigin);
frameRadius = ent->e.radius;
#ifndef REND2_SP
int j;
for ( i = 1 ; i < tr.world->numfogs ; i++ ) {
fog = &tr.world->fogs[i];
for ( j = 0 ; j < 3 ; j++ ) {
Expand Down
4 changes: 2 additions & 2 deletions shared/rd-rend2/tr_main.cpp
Expand Up @@ -1654,7 +1654,7 @@ See if a sprite is inside a fog volume
=================
*/
int R_SpriteFogNum( trRefEntity_t *ent ) {
int i, j;
int i;
float frameRadius;
fog_t *fog;
vec3_t localOrigin;
Expand All @@ -1666,6 +1666,7 @@ int R_SpriteFogNum( trRefEntity_t *ent ) {
VectorCopy(ent->e.origin, localOrigin);
frameRadius = ent->e.radius;
#ifndef REND2_SP
int j;
for (i = 1; i < tr.world->numfogs; i++) {
fog = &tr.world->fogs[i];
for (j = 0; j < 3; j++) {
Expand Down Expand Up @@ -2300,7 +2301,6 @@ void R_SetupViewParmsForOrthoRendering(

void R_SetupPshadowMaps(trRefdef_t *refdef)
{
viewParms_t shadowParms;
int i;

// first, make a list of shadows
Expand Down
4 changes: 2 additions & 2 deletions shared/rd-rend2/tr_mesh.cpp
Expand Up @@ -168,7 +168,6 @@ RE_GetModelBounds
void RE_GetModelBounds(refEntity_t *refEnt, vec3_t bounds1, vec3_t bounds2)
{
mdvFrame_t *frame;
md3Header_t *header;
model_t *model;

assert(refEnt);
Expand Down Expand Up @@ -269,7 +268,7 @@ R_ComputeFogNum
=================
*/
int R_ComputeFogNum( mdvModel_t *model, trRefEntity_t *ent ) {
int i, j;
int i;
float frameRadius;
fog_t *fog;
mdvFrame_t *mdvFrame;
Expand All @@ -284,6 +283,7 @@ int R_ComputeFogNum( mdvModel_t *model, trRefEntity_t *ent ) {
VectorAdd( ent->e.origin, mdvFrame->localOrigin, localOrigin );
frameRadius = mdvFrame->radius;
#ifndef REND2_SP
int j;
for ( i = 1 ; i < tr.world->numfogs ; i++ ) {
fog = &tr.world->fogs[i];
for ( j = 0 ; j < 3 ; j++ ) {
Expand Down

0 comments on commit 5577c98

Please sign in to comment.