Fix renderergl2 warnings

This commit is contained in:
Tim Angus 2014-09-01 11:35:49 +01:00
parent d38039f975
commit 6665ea4a49
4 changed files with 7 additions and 9 deletions

View file

@ -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;
}
@ -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;
@ -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;
@ -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;

View file

@ -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;

View file

@ -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

View file

@ -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;