[SCM] libav/experimental: Silence "comparison of unsigned expression >= 0 is always true" warning.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:10:14 UTC 2013


The following commit has been merged in the experimental branch:
commit b7cdddcd1f0cbee60f6322ead7f13acd02fb55ca
Author: Eli Friedman <eli.friedman at gmail.com>
Date:   Sat Jul 3 17:06:12 2010 +0000

    Silence "comparison of unsigned expression >= 0 is always true" warning.
    
    Patch by Eli Friedman, eli d friedman a gmail
    
    Originally committed as revision 24022 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavutil/mathematics.c b/libavutil/mathematics.c
index 00b81f1..c6851cb 100644
--- a/libavutil/mathematics.c
+++ b/libavutil/mathematics.c
@@ -78,7 +78,7 @@ int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd){
     int64_t r=0;
     assert(c > 0);
     assert(b >=0);
-    assert(rnd >=0 && rnd<=5 && rnd!=4);
+    assert((unsigned)rnd<=5 && rnd!=4);
 
     if(a<0 && a != INT64_MIN) return -av_rescale_rnd(-a, b, c, rnd ^ ((rnd>>1)&1));
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list