diff options
author | Tim Angus <tim@ngus.net> | 2014-08-30 17:29:09 +0100 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2015-03-17 11:38:07 +0000 |
commit | 61f78e272375bba4c55e8a976c9f73e6ed1b5713 (patch) | |
tree | fa832f3c63db10d0ddb9d936e05b2a5e20b1bb33 /src/renderergl1 | |
parent | f67547574ba6f11f8e52ceba614992ca953aae4a (diff) |
Fix a few warnings
Diffstat (limited to 'src/renderergl1')
-rw-r--r-- | src/renderergl1/tr_bsp.c | 6 | ||||
-rw-r--r-- | src/renderergl1/tr_shader.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/renderergl1/tr_bsp.c b/src/renderergl1/tr_bsp.c index bde7ad0c..dc695cce 100644 --- a/src/renderergl1/tr_bsp.c +++ b/src/renderergl1/tr_bsp.c @@ -928,7 +928,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; @@ -972,7 +972,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; @@ -1027,7 +1027,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/renderergl1/tr_shader.c b/src/renderergl1/tr_shader.c index 1408902d..f84d02c6 100644 --- a/src/renderergl1/tr_shader.c +++ b/src/renderergl1/tr_shader.c @@ -2916,7 +2916,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] = {0}; char *p; int numShaderFiles; int i; |