* Fix various warnings with GCC and clang

This commit is contained in:
Tim Angus 2011-10-27 21:32:28 +00:00
parent 675e7a641a
commit fd986dae06
8 changed files with 31 additions and 22 deletions

View file

@ -272,11 +272,11 @@ static shader_t *ShaderForShaderNum( int shaderNum, int lightmapNum ) {
shader_t *shader;
dshader_t *dsh;
shaderNum = LittleLong( shaderNum );
if ( shaderNum < 0 || shaderNum >= s_worldData.numShaders ) {
ri.Error( ERR_DROP, "ShaderForShaderNum: bad num %i", shaderNum );
int _shaderNum = LittleLong( shaderNum );
if ( _shaderNum < 0 || _shaderNum >= s_worldData.numShaders ) {
ri.Error( ERR_DROP, "ShaderForShaderNum: bad num %i", _shaderNum );
}
dsh = &s_worldData.shaders[ shaderNum ];
dsh = &s_worldData.shaders[ _shaderNum ];
if ( r_vertexLight->integer || glConfig.hardwareType == GLHW_PERMEDIA2 ) {
lightmapNum = LIGHTMAP_BY_VERTEX;