diff --git a/ref/gl/gl2_shim/gl2_shim.c b/ref/gl/gl2_shim/gl2_shim.c index 3fa5df38..e2bf2c45 100644 --- a/ref/gl/gl2_shim/gl2_shim.c +++ b/ref/gl/gl2_shim/gl2_shim.c @@ -769,7 +769,6 @@ void GL2_ShimEndFrame( void ) static void APIENTRY GL2_Begin( GLenum prim ) { - int i; if( gl2wrap.begin + MAX_BEGINEND_VERTS > GL2_MAX_VERTS ) GL2_ResetPersistentBuffer(); @@ -978,7 +977,6 @@ leave_label: static void APIENTRY GL2_End( void ) { - int i; #ifdef QUAD_BATCH if( gl2wrap.prim == GL_QUADS ) { diff --git a/ref/gl/gl_alias.c b/ref/gl/gl_alias.c index 6f426868..543213cd 100644 --- a/ref/gl/gl_alias.c +++ b/ref/gl/gl_alias.c @@ -704,7 +704,6 @@ static void GL_DrawAliasShadow( aliashdr_t *paliashdr ) float vec_x, vec_y; vec3_t av, point; int *order; - float height; int count; if( FBitSet( RI.currententity->curstate.effects, EF_NOSHADOW )) @@ -713,7 +712,6 @@ static void GL_DrawAliasShadow( aliashdr_t *paliashdr ) if( glState.stencilEnabled ) pglEnable( GL_STENCIL_TEST ); - height = g_alias.lightspot[2] + 1.0f; vec_x = -g_alias.lightvec[0] * 8.0f; vec_y = -g_alias.lightvec[1] * 8.0f; diff --git a/ref/gl/gl_image.c b/ref/gl/gl_image.c index 216039fa..d51461d8 100644 --- a/ref/gl/gl_image.c +++ b/ref/gl/gl_image.c @@ -688,7 +688,7 @@ box filter 3x3 static void GL_BoxFilter3x3( byte *out, const byte *in, int w, int h, int x, int y ) { int r = 0, g = 0, b = 0, a = 0; - int count = 0, acount = 0; + int acount = 0; int i, j, u, v; const byte *pixel; @@ -982,7 +982,6 @@ static qboolean GL_UploadTexture( gl_texture_t *tex, rgbdata_t *pic ) size_t texsize, size; uint width, height, depth; uint i, j, numSides; - uint offset = 0; qboolean normalMap; qboolean texture3d; const byte *bufend; @@ -1028,7 +1027,6 @@ static qboolean GL_UploadTexture( gl_texture_t *tex, rgbdata_t *pic ) buf = pic->buffer; bufend = pic->buffer + pic->size; // total image size include all the layers, cube sides, mipmaps - offset = gEngfuncs.Image_CalcImageSize( pic->type, pic->width, pic->height, pic->depth ); texsize = GL_CalcTextureSize( tex->format, tex->width, tex->height, tex->depth ); normalMap = FBitSet( tex->flags, TF_NORMALMAP ) ? true : false; numSides = FBitSet( pic->flags, IMAGE_CUBEMAP ) ? 6 : 1; @@ -1458,7 +1456,6 @@ int GL_LoadTextureArray( const char **names, int flags ) rgbdata_t *pic, *src; char basename[256]; uint numLayers = 0; - uint picFlags = 0; char name[256]; gl_texture_t *tex; size_t len = 0; diff --git a/ref/gl/gl_rsurf.c b/ref/gl/gl_rsurf.c index df6f0127..cd957c61 100644 --- a/ref/gl/gl_rsurf.c +++ b/ref/gl/gl_rsurf.c @@ -209,14 +209,12 @@ static void SubdividePolygon_r( model_t *loadmodel, msurface_t *warpface, int nu float dist[SUBDIVIDE_SIZE]; float m, frac, *v; int i, j, k, f, b; - float sample_size; vec3_t mins, maxs; glpoly2_t *poly; if( numverts > ( SUBDIVIDE_SIZE - 4 )) gEngfuncs.Host_Error( "%s: too many vertexes on face ( %i )\n", __func__, numverts ); - sample_size = gEngfuncs.Mod_SampleSizeForFace( warpface ); BoundPoly( numverts, verts, mins, maxs ); for( i = 0; i < 3; i++ ) diff --git a/ref/gl/gl_studio.c b/ref/gl/gl_studio.c index 8ca26135..11b26610 100644 --- a/ref/gl/gl_studio.c +++ b/ref/gl/gl_studio.c @@ -1265,7 +1265,7 @@ static void R_StudioEntityLight( alight_t *lightinfo ) float minstrength, dist2, f, r2; float lstrength[MAX_LOCALLIGHTS]; cl_entity_t *ent = RI.currententity; - vec3_t mid, origin, pos; + vec3_t mid, origin; g_studio.numlocallights = 0; @@ -1294,7 +1294,6 @@ static void R_StudioEntityLight( alight_t *lightinfo ) else VectorCopy( ent->origin, el->origin ); } - VectorCopy( el->origin, pos ); VectorSubtract( origin, el->origin, mid ); f = DotProduct( mid, mid ); @@ -1810,9 +1809,7 @@ generic path */ static void R_StudioBuildArrayNormalMesh( short *ptricmds, vec3_t *pstudionorms, float s, float t ) { - float *lv; int i; - float alpha = tr.blend; while(( i = *( ptricmds++ ))) { @@ -1829,7 +1826,6 @@ static void R_StudioBuildArrayNormalMesh( short *ptricmds, vec3_t *pstudionorms, { GLubyte *cl; cl = g_studio.arraycolor[g_studio.numverts]; - lv = (float *)g_studio.lightvalues[ptricmds[1]]; vertexState = R_StudioBuildIndices( tri_strip, vertexState ); @@ -1853,9 +1849,7 @@ generic path */ static void R_StudioBuildArrayFloatMesh( short *ptricmds, vec3_t *pstudionorms ) { - float *lv; int i; - float alpha = tr.blend; while(( i = *( ptricmds++ ))) { @@ -1872,7 +1866,6 @@ static void R_StudioBuildArrayFloatMesh( short *ptricmds, vec3_t *pstudionorms ) { GLubyte *cl; cl = g_studio.arraycolor[g_studio.numverts]; - lv = (float *)g_studio.lightvalues[ptricmds[1]]; vertexState = R_StudioBuildIndices( tri_strip, vertexState ); @@ -1900,7 +1893,6 @@ static void R_StudioBuildArrayChromeMesh( short *ptricmds, vec3_t *pstudionorms, int i, idx; qboolean glowShell = (scale > 0.0f) ? true : false; vec3_t vert; - float alpha = tr.blend; while(( i = *( ptricmds++ ))) { @@ -2688,7 +2680,7 @@ R_StudioDrawPointsShadow */ static void R_StudioDrawPointsShadow( void ) { - float *av, height; + float *av; float vec_x, vec_y; mstudiomesh_t *pmesh; vec3_t point; @@ -2700,7 +2692,6 @@ static void R_StudioDrawPointsShadow( void ) if( glState.stencilEnabled ) pglEnable( GL_STENCIL_TEST ); - height = g_studio.lightspot[2] + 1.0f; vec_x = -g_studio.lightvec[0] * 8.0f; vec_y = -g_studio.lightvec[1] * 8.0f;