[Bf-committers] new round of warning hunt : some goofy things i
cant decide on
jlp at nerim.net
Sat Jun 4 12:45:09 CEST 2005
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
movie size is defined as unsigned while file operation operates on
long in function AVI_open_movie, should we cast ?
* blender.c line 709
chunk->size is unsigned int while write return signed (-1 for fail)
and are compared
* cmap lines 349 354 359
* drawtext.c function get_format_string
strlen() return insigned value but the temp value is signed. btw this
function seems a bit overgrown
line 2294 : 0xFFFFFFFF is an unsigned value compared to an int
function drawbone : id argument is unsigned but compared to -1
function get_nearest_editbonepoint : firstunSel is defined as unsigned
but inited to -1 !
function mousemball shouldn't buffer be a short array and a, hits
signed/unsigned pointer comparisons
function select_linked_face: shouldn't a be int, not unsigned int ?
function mouse select signed values/unsigned buffer
int compared to sizeof values
function imb_start_iff size should be int ?
but->pos= strlen(str) need cast ?
What do you think of that ?
there is also a bunch of such issues in qhull but i would not dare to
More information about the Bf-committers