Warning fixes for r1648
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ikarus Scheme |
Fix Committed
|
Low
|
Abdulaziz Ghuloum |
Bug Description
Attached is a patch to fix a few warnings I found. Below is an explanation of the warnings and how they were fixed. After that are listed some warnings that I found that were not fixed in the patch.
FIXED WARNINGS:
ikarus-ffi.c:193: warning: ‘dump_stack’ defined but not used
- guard with #ifdef DEBUG_FFI
ikarus-ffi.c:338: warning: ISO C forbids passing argument 2 of ‘ffi_call’ between function pointer and ‘void *’
- use "void (*fn)() = FFI_FN(...)"
ikarus-
- "(void*
ikarus-ffi.c:173: warning: comparison between signed and unsigned
ikarus-ffi.c:328: warning: comparison between signed and unsigned
ikarus-ffi.c:340: warning: comparison between signed and unsigned
ikarus-ffi.c:405: warning: comparison between signed and unsigned
- make "i" into "unsigned int"
UNFIXED WARNINGS: The following are warnings I didn't know if or how they should be fixed
ikarus-
- Maybe use "unsigned long int size" in function signature?
- If change, ensure ik_munmap is consistent with ik_munmap_
ikarus-
- the problem is "relative_distance != (int)relative_
- added in r1544
- seems to be intentional but I'm not sure what the motive is or if there is a better way
- if kept should have a comment explaining what it is about
Related branches
Changed in ikarus: | |
milestone: | none → 0.0.4 |
Thanks!, fixed in rev 1653. collect. c:1363: warning: comparison between signed and unsigned distance"
Re:
ikarus-
- the problem is "relative_distance != (int)relative_
- added in r1544
- seems to be intentional but I'm not sure what the motive is or if there is a better way
- if kept should have a comment explaining what it is about
I changed that test to be: distance) != ((long) ((int)relative_ distance) )){
if(((long int)relative_
which means: does the value change if cast to an int. I think it's as clear as C could be. :-)
BTW, and maybe I asked you this before, but what version of gcc do you use, and what flags do you give it?