From: divverent Date: Mon, 13 Jun 2011 18:34:46 +0000 (+0000) Subject: fix some warnings about useless code (unsigned < 0, x = x) X-Git-Tag: xonotic-v0.6.0~163^2~348 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=76ac9a336b02cf18504e9c3253294e8058cdc3dc;p=xonotic%2Fdarkplaces.git fix some warnings about useless code (unsigned < 0, x = x) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11198 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_input.c b/cl_input.c index 5bdc34bc..8fe0d4cb 100644 --- a/cl_input.c +++ b/cl_input.c @@ -588,14 +588,7 @@ void CL_Input (void) } else { - /* - f = log(averagespeed); - mi = log(mi); - ma = log(ma); - */ f = averagespeed; - mi = mi; - ma = ma; f = (f - mi) / (ma - mi) * (m_accelerate.value - 1) + 1; } diff --git a/cl_video_jamdecode.c b/cl_video_jamdecode.c index 05650016..a652dbc2 100644 --- a/cl_video_jamdecode.c +++ b/cl_video_jamdecode.c @@ -250,7 +250,7 @@ readframe: { compsize = LittleLong(*(frameHead + 8)) - 16; outsize = LittleLong(*(frameHead + 12)); - if (compsize < 0 || compsize > s->framesize || outsize < 0 || outsize > s->framesize) + if (compsize > s->framesize || outsize > s->framesize) s->error = JAMDECODEERROR_BAD_FRAME_HEADER; else if (FS_Read(s->file, s->compressed, compsize)) { @@ -352,4 +352,4 @@ readframe: else s->error = DPVSIMPLEDECODEERROR_EOF; return s->error; -} \ No newline at end of file +} diff --git a/gl_rmain.c b/gl_rmain.c index 8574aeb2..2c5eb11c 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -7490,7 +7490,9 @@ static float R_EvaluateQ3WaveFunc(q3wavefunc_t func, const float *parms) index *= 4; f = index - floor(index); if (index < 1) - f = f; + { + // f = f; + } else if (index < 2) f = 1 - f; else if (index < 3) diff --git a/snd_mix.c b/snd_mix.c index d4975781..6bec880e 100644 --- a/snd_mix.c +++ b/snd_mix.c @@ -510,7 +510,7 @@ void S_MixToBuffer(void *stream, unsigned int bufferframes) continue; if (!sfx->total_length) continue; - if (sfx->total_length < 0 || sfx->total_length > 1<<30) + if (sfx->total_length > 1<<30) Sys_Error("S_MixToBuffer: sfx corrupt\n"); ltime = 0;