summaryrefslogtreecommitdiff
path: root/src/renderergl2
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2014-09-01 11:35:49 +0100
committerTim Angus <tim@ngus.net>2015-03-17 11:38:07 +0000
commitbf03a00fc4f11e72b95bc47fd0c4113413036067 (patch)
treeab137f6526f4fa6fe3efbee54ff0faad613665a3 /src/renderergl2
parent61917e9828e2429064de713f43a398f083e6885e (diff)
Fix renderergl2 warnings
Diffstat (limited to 'src/renderergl2')
-rw-r--r--src/renderergl2/tr_bsp.c10
-rw-r--r--src/renderergl2/tr_model_iqm.c2
-rw-r--r--src/renderergl2/tr_shade_calc.c2
-rw-r--r--src/renderergl2/tr_shader.c2
4 files changed, 7 insertions, 9 deletions
diff --git a/src/renderergl2/tr_bsp.c b/src/renderergl2/tr_bsp.c
index e1a86331..57fee661 100644
--- a/src/renderergl2/tr_bsp.c
+++ b/src/renderergl2/tr_bsp.c
@@ -600,9 +600,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;
}
@@ -1474,7 +1472,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;
@@ -1518,7 +1516,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;
@@ -1573,7 +1571,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;
diff --git a/src/renderergl2/tr_model_iqm.c b/src/renderergl2/tr_model_iqm.c
index d0ad6074..febcf59b 100644
--- a/src/renderergl2/tr_model_iqm.c
+++ b/src/renderergl2/tr_model_iqm.c
@@ -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;
diff --git a/src/renderergl2/tr_shade_calc.c b/src/renderergl2/tr_shade_calc.c
index 9b2ac3e8..b6a3e205 100644
--- a/src/renderergl2/tr_shade_calc.c
+++ b/src/renderergl2/tr_shade_calc.c
@@ -641,7 +641,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
diff --git a/src/renderergl2/tr_shader.c b/src/renderergl2/tr_shader.c
index 9b0e64bb..6b7cdc7f 100644
--- a/src/renderergl2/tr_shader.c
+++ b/src/renderergl2/tr_shader.c
@@ -3693,7 +3693,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;