[FFmpeg-devel] [PATCH] Fix warning in av_rescale_rnd (in	libavutil/mathematics.c)
    Eli Friedman 
    eli.friedman
       
    Sat Jul  3 09:42:08 CEST 2010
    
    
  
Patch attached.  Fixes warning "comparison of unsigned expression >= 0
is always true".
-Eli
-------------- next part --------------
Index: libavutil/mathematics.c
===================================================================
--- libavutil/mathematics.c	(revision 24018)
+++ libavutil/mathematics.c	(working copy)
@@ -78,7 +78,9 @@
     int64_t r=0;
     assert(c > 0);
     assert(b >=0);
-    assert(rnd >=0 && rnd<=5 && rnd!=4);
+    assert(rnd == AV_ROUND_ZERO || rnd == AV_ROUND_INF ||
+           rnd == AV_ROUND_DOWN || rnd == AV_ROUND_UP ||
+           rnd == AV_ROUND_NEAR_INF);
 
     if(a<0 && a != INT64_MIN) return -av_rescale_rnd(-a, b, c, rnd ^ ((rnd>>1)&1));
 
    
    
More information about the ffmpeg-devel
mailing list