From 174371d91d9450d9b746e581c54241acc3e757d3 Mon Sep 17 00:00:00 2001 From: divverent Date: Thu, 19 Apr 2012 20:27:45 +0000 Subject: [PATCH] remove some more dead code ("Dead Increment" bugs from clang-analyzer); however, many of these were kept there as they help making code more readable/maintainable (e.g. incrementing data pointer after the LAST read from a model) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11804 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_input.c | 1 - dpsoftrast.c | 4 +--- gl_rmain.c | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/cl_input.c b/cl_input.c index 2dd21acd..94c7ef3b 100644 --- a/cl_input.c +++ b/cl_input.c @@ -697,7 +697,6 @@ void CL_Input (void) { // digital direction, analog amount vec_t wishvel_x, wishvel_y; - f *= max(cl_sidespeed.value, max(cl_forwardspeed.value, cl_backspeed.value)); wishvel_x = fabs(cl.cmd.forwardmove); wishvel_y = fabs(cl.cmd.sidemove); if(wishvel_x != 0 && wishvel_y != 0 && wishvel_x != wishvel_y) diff --git a/dpsoftrast.c b/dpsoftrast.c index 4967ef0e..754cf685 100644 --- a/dpsoftrast.c +++ b/dpsoftrast.c @@ -2055,11 +2055,9 @@ static void DPSOFTRAST_Draw_Span_FinishBGRA8(DPSOFTRAST_State_Thread *thread, co int subx; const unsigned int * RESTRICT ini = (const unsigned int *)in4ub; unsigned char * RESTRICT pixelmask = span->pixelmask; - unsigned char * RESTRICT pixel = (unsigned char *)dpsoftrast.fb_colorpixels[0]; unsigned int * RESTRICT pixeli = (unsigned int *)dpsoftrast.fb_colorpixels[0]; - if (!pixel) + if (!pixeli) return; - pixel += (span->y * dpsoftrast.fb_width + span->x) * 4; pixeli += span->y * dpsoftrast.fb_width + span->x; // handle alphatest now (this affects depth writes too) if (thread->shader_permutation & SHADERPERMUTATION_ALPHAKILL) diff --git a/gl_rmain.c b/gl_rmain.c index b5c1a02c..13660bfe 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -3584,7 +3584,7 @@ skinframe_t *R_SkinFrame_LoadInternalQuake(const char *name, int textureflags, i skinframe = R_SkinFrame_Find(name, textureflags, width, height, skindata ? CRC_Block(skindata, width*height) : 0, true); if (skinframe->base) return skinframe; - textureflags &= ~TEXF_FORCE_RELOAD; + //textureflags &= ~TEXF_FORCE_RELOAD; skinframe->stain = NULL; skinframe->merged = NULL; -- 2.39.2