Skip to content

Commit

Permalink
Fix renderergl2 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
timangus committed Sep 1, 2014
1 parent d38039f commit 6665ea4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
10 changes: 4 additions & 6 deletions code/renderergl2/tr_bsp.c
Expand Up @@ -599,9 +599,7 @@ static void R_LoadVisibility( lump_t *l ) {
int len;
byte *buf;

len = ( s_worldData.numClusters + 63 ) & ~63;

len = l->filelen;
len = l->filelen;
if ( !len ) {
return;
}
Expand Down Expand Up @@ -1473,7 +1471,7 @@ int R_StitchPatches( int grid1num, int grid2num ) {

for (m = 0; m < 2; m++) {

if ( grid2->width >= MAX_GRID_SIZE )
if ( !grid2 || grid2->width >= MAX_GRID_SIZE )
break;
if (m) offset2 = (grid2->height-1) * grid2->width;
else offset2 = 0;
Expand Down Expand Up @@ -1517,7 +1515,7 @@ int R_StitchPatches( int grid1num, int grid2num ) {
}
for (m = 0; m < 2; m++) {

if (grid2->height >= MAX_GRID_SIZE)
if (!grid2 || grid2->height >= MAX_GRID_SIZE)
break;
if (m) offset2 = grid2->width-1;
else offset2 = 0;
Expand Down Expand Up @@ -1572,7 +1570,7 @@ int R_StitchPatches( int grid1num, int grid2num ) {
for (k = grid1->height-1; k > 1; k -= 2) {
for (m = 0; m < 2; m++) {

if ( grid2->width >= MAX_GRID_SIZE )
if (!grid2 || grid2->width >= MAX_GRID_SIZE )
break;
if (m) offset2 = (grid2->height-1) * grid2->width;
else offset2 = 0;
Expand Down
2 changes: 1 addition & 1 deletion code/renderergl2/tr_model_iqm.c
Expand Up @@ -144,7 +144,7 @@ qboolean R_LoadIQM( model_t *mod, void *buffer, int filesize, const char *mod_na
unsigned short *framedata;
char *str;
int i, j;
float jointInvMats[IQM_MAX_JOINTS * 12];
float jointInvMats[IQM_MAX_JOINTS * 12] = {0.0f};
float *mat, *matInv;
size_t size, joint_names;
iqmData_t *iqmData;
Expand Down
2 changes: 1 addition & 1 deletion code/renderergl2/tr_shade_calc.c
Expand Up @@ -640,7 +640,7 @@ float RB_CalcWaveAlphaSingle( const waveForm_t *wf )
*/
void RB_CalcModulateColorsByFog( unsigned char *colors ) {
int i;
float texCoords[SHADER_MAX_VERTEXES][2];
float texCoords[SHADER_MAX_VERTEXES][2] = {{0.0f}};

// calculate texcoords so we can derive density
// this is not wasted, because it would only have
Expand Down
2 changes: 1 addition & 1 deletion code/renderergl2/tr_shader.c
Expand Up @@ -3692,7 +3692,7 @@ a single large text block that can be scanned for shader names
static void ScanAndLoadShaderFiles( void )
{
char **shaderFiles;
char *buffers[MAX_SHADER_FILES];
char *buffers[MAX_SHADER_FILES] = {NULL};
char *p;
int numShaderFiles;
int i;
Expand Down

0 comments on commit 6665ea4

Please sign in to comment.