[FFmpeg-devel] [PATCH] Fix warning in av_rescale_rnd (in libavutil/mathematics.c)
Reimar Döffinger
Reimar.Doeffinger
Sat Jul 3 13:02:55 CEST 2010
On Sat, Jul 03, 2010 at 12:17:25PM +0200, Michael Niedermayer wrote:
> On Sat, Jul 03, 2010 at 12:42:08AM -0700, Eli Friedman wrote:
> > Patch attached. Fixes warning "comparison of unsigned expression >= 0
> > is always true".
>
> god damn, its a assert(), what is wrong with asserting that a variable
> is unsigned or if signed is positive. Why is gcc so retarded
Umm, gcc just can't know your intention. I have seen this kind of
thing quite a few times where it was an actual bug because someone
forgot to make a variable signed.
That said, casting the value to int before the comparison should
avoid the warning...
More information about the ffmpeg-devel
mailing list