Skip to content

Commit

Permalink
FIx "local variable is initialized but not referenced" warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
SamVanheer committed Mar 16, 2022
1 parent 73b69d1 commit 7dee282
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion utils/common/bspfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ Dumps info about current file
*/
void PrintBSPFileSizes (void)
{
int numtextures = texdatasize ? ((dmiptexlump_t*)dtexdata)->nummiptex : 0;
//int numtextures = texdatasize ? ((dmiptexlump_t*)dtexdata)->nummiptex : 0;
int totalmemory = 0;

printf("\n");
Expand Down
2 changes: 1 addition & 1 deletion utils/common/bsplib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ Dumps info about current file
*/
void PrintBSPFileSizes (void)
{
int numtextures = texdatasize ? ((dmiptexlump_t*)dtexdata)->nummiptex : 0;
//int numtextures = texdatasize ? ((dmiptexlump_t*)dtexdata)->nummiptex : 0;
int totalmemory = 0;

printf("\n");
Expand Down
2 changes: 1 addition & 1 deletion utils/common/lbmlib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ int WriteBMPfile (char *szFile, byte *pbBits, int width, int height, byte *pbPal
RGBQUAD rgrgbPalette[256];
ULONG cbBmpBits;
BYTE* pbBmpBits;
byte *pb, *pbPal = NULL;
byte *pb;
ULONG cbPalBytes;
ULONG biTrueWidth;

Expand Down
2 changes: 1 addition & 1 deletion utils/procinfo/procinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ QWORD GetRDTSC(void)
int PROC_GetSpeed(void)
{
QWORD StartClock, ElapClock;
DWORD StartTime, times = 0;
DWORD StartTime;
int RetVal;

if (!HasTsc())
Expand Down
7 changes: 3 additions & 4 deletions utils/qrad/qrad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ void ReadLightFile (char *filename)
FILE *f;
char scan[128];
short argCnt;
int i = 1.0, j, file_texlights = 0;
int j, file_texlights = 0;

f = fopen (filename, "r");
if (!f)
Expand Down Expand Up @@ -293,8 +293,6 @@ void BaseLightForFace( dface_t *f, vec3_t light, vec3_t /*reflectivity*/ )
miptex_t *mt;
int ofs;

long samples = 0;

//
// check for light emited by texture
//
Expand All @@ -306,6 +304,7 @@ void BaseLightForFace( dface_t *f, vec3_t light, vec3_t /*reflectivity*/ )
LightForTexture (mt->name, light);

#ifdef TEXTURE_REFLECTIVITY
long samples = 0;
long sum[3];

// Average up the texture pixels' color for an average reflectivity
Expand Down Expand Up @@ -399,7 +398,7 @@ void MakePatchForFace (int fn, winding_t *w)
for (j=0 ; j<f->numedges ; j++)
{
int edge = dsurfedges[ f->firstedge + j ];
int edge2 = dsurfedges[ j==f->numedges-1 ? f->firstedge : f->firstedge + j + 1 ];
//int edge2 = dsurfedges[ j==f->numedges-1 ? f->firstedge : f->firstedge + j + 1 ];

if (edge > 0)
{
Expand Down
3 changes: 0 additions & 3 deletions utils/studiomdl/studiomdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,6 @@ void adjust_vertex( float *org )

void scale_vertex( float *org )
{
float tmp = org[0];
org[0] = org[0] * scale_up;
org[1] = org[1] * scale_up;
org[2] = org[2] * scale_up;
Expand Down Expand Up @@ -2261,8 +2260,6 @@ void Cmd_Bodygroup( )

void Cmd_Body( )
{
int is_started = 0;

if (!GetToken(false)) return;

if (numbodyparts == 0) {
Expand Down

0 comments on commit 7dee282

Please sign in to comment.