[MPlayer-dev-eng] spudec.c : warnings ?

D Richard Felker III dalias at aerifal.cx
Wed Jan 29 04:40:36 CET 2003


On Wed, Jan 29, 2003 at 03:36:16AM +0100, Sylvain Petreolle wrote:
> When compiling spudec.c, I get these warnings :
> spudec.c: In function `spudec_calc_bbox':
> spudec.c:615: warning: comparison of unsigned expression < 0 is always
> false
> spudec.c:625: warning: comparison of unsigned expression < 0 is always
> false
> spudec.c:1029: warning: comparison of unsigned expression < 0 is always
> false
> spudec.c:1037: warning: comparison of unsigned expression < 0 is always
> false
> 
> ligne 615 is
>         if (bbox[2] < 0) bbox[2] = 0;
> and bbox is unsigned int * bbox.
> 
> Comments ?

Crap, 100l to me! The easy solution would be to change it to signed
int. Alternatively you could use temporary signed ints in the function
and then store the values in bbox at the end.

The weird part, though, is that the code seemed to behave correctly
for me...

Rich



More information about the MPlayer-dev-eng mailing list