fix some warnings about useless code (unsigned < 0, x = x)
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 13 Jun 2011 18:34:46 +0000 (18:34 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 13 Jun 2011 18:34:46 +0000 (18:34 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11198 d7cf8633-e32d-0410-b094-e92efae38249

cl_input.c
cl_video_jamdecode.c
gl_rmain.c
snd_mix.c

index 5bdc34b..8fe0d4c 100644 (file)
@@ -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;
                }
 
index 0565001..a652dbc 100644 (file)
@@ -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
+}
index 8574aeb..2c5eb11 100644 (file)
@@ -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)
index d497578..6bec880 100644 (file)
--- 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;