From: Zoltan B. <zb...@du...> - 2005-06-20 20:40:19
|
Hi, I tried to find why RLIB crashes on my FC3/x86-64 system. Although valgrind for AMD64 found 1 error caused by a mis-sized malloc, it is still in its infancy, today's valgrind subversion repo segfaults. Instead, I tried to use GCC 4 to find the error. I used this exaggerated warning level: CFLAGS=3D"-g -O -pedantic -Wcomment -Wformat -Wimplicit -Wmultichar \ -Wparentheses -Wreturn-type -Wswitch -Wunused -Wuninitialized -Wall \ -W -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wconversion \ -Wstrict-prototypes -Wlong-long In this first patch, I corrected the following (most annoying) warning types, some of which are actual coding bugs: warning: function declaration isn't a prototype warning: ISO C90 forbids mixed declarations and code warning: ISO C forbids conversion of function pointer to object pointer t= ype warning: ISO C forbids initialization between function pointer and 'void = *' warning: ISO C forbids assignment between function pointer and 'void *' warning: declaration of 'var/func' shadows a previous local warning: declaration of 'var/func' shadows a global declaration warning: ISO C does not allow extra ';' outside of a function warning: empty body in an if-statement Please, review the patch, especially the two fixes in graphing.c, that fixes this construct, note the ';' after the if(): if (condition); do_something(); and the changes in layout.c from line 836 so the changes follow the original intention. All the other changes in the attached patch are trivial changes. Best regards, Zolt=E1n B=F6sz=F6rm=E9nyi |