[Bf-committers] new round of warning hunt : some goofy things i
cant decide on
Jean-Luc Peuriere
jlp at nerim.net
Sat Jun 4 12:45:09 CEST 2005
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 ?
* blender.c line 709
chunk->size is unsigned int while write return signed (-1 for fail)
and are compared
* cmap lines 349 354 359
comparison signed/unsigned
* drawtext.c function get_format_string
strlen() return insigned value but the temp value is signed. btw this
function seems a bit overgrown
*editarmature.c
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 !
* editmball.c
function mousemball shouldn't buffer be a short array and a, hits
shorts ?
* editmesh_mods.c
signed/unsigned pointer comparisons
* editssima.c
function select_linked_face: shouldn't a be int, not unsigned int ?
* editview.c
function mouse select signed values/unsigned buffer
* hamx;c
int compared to sizeof values
* iff.c
function imb_start_iff size should be int ?
* interface.c
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
touch that
--
Jean-Luc
More information about the Bf-committers
mailing list