]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
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)
committerRudolf Polzer <divverent@xonotic.org>
Mon, 13 Jun 2011 18:28:25 +0000 (20:28 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11198 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=76ac9a336b02cf18504e9c3253294e8058cdc3dc

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

index 5bdc34bc46ae2026b23e6aa50930882bde87d436..8fe0d4cbeffc5dd513a1ae86c855836b135339f1 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 05650016f9c523fd4d0449993bab8bc7bcca75a4..a652dbc221734955ef5480e630fb9ecd1f5da783 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 8574aeb2db3c3dc43ed43ee2915348e17d72a800..2c5eb11caa4c868a3b5dfc07dd181309c4c71f46 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 d497578129dedf92fd98506d4b416e26324ab95c..6bec880eae3974665dcc699feff687b8a84779fb 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;