[Bf-committers] new round of warning hunt : some goofy things i cant decide on

Vio vmilitaru at sympatico.ca
Sat Jun 4 13:29:04 CEST 2005


Jean-Luc Peuriere wrote:

> Hi,
>
> I'm making a new round of warnings checks, and corrected somes but
>  found some things that may be problematic but cant decide on :
>
> most are signed/unsigned issues that work on 32 bits but could fail 
> subtly for 64 bits builds.
>
> * ,avi.c :
>     GET_FCC function returns an unsigned int, while FCC() define gives 
> an int
>     movie size is defined as unsigned while file operation operates on 
> long in function AVI_open_movie, should we cast ?

Duh. I've heard somewhere that *casts* is a way to cheat the compiler, 
but then again, if you
want your code to compile, what other choice is there (besides hacking 
the offending sources)?
I personally find signed/unsigned keywords more annoying than anything 
else, but then again,
I'm just a clueless newbie. I guess coding style may play a little here.
By the way, if using gcc, you may find the "-w" flag useful in such 
situations
(separates the "unimportant" from what really is).
Cheers,
vio




More information about the Bf-committers mailing list