Re: [Etherboot-developers] tidy ups
Brought to you by:
marty_connor,
stefanhajnoczi
From: <ebi...@ln...> - 2003-03-17 22:49:47
|
ke...@us... writes: > I've just checked in a bunch of tidy ups to source files to remove > unused variable warnings. I've also got rid of line that was causing the > shell to barf on a FP number in arch/i386/Makefile. > > Does anybody know how to declare the unused attribute on function > parameters, and just as important, does it work with older gcc versions > like 2.95? > > Does anybody know how to get rid of these warnings? I assume this is > because they are now predeclared in gcc 3.x? Some one ages ago had globally disabled them. And given that size was important I reenabled the unused variable warnings so we could find legitimately unusued variables. > > arch/i386/include/bits/string.h:254: warning: static declaration for `strncmp' > follows non-static > > arch/i386/include/bits/string.h:277: warning: static declaration for `strlen' > follows non-static I probably should check the HAVE_ARCH_BLAH macros to get rid of these. The inline functions need to be static inline to be correct C code. Possibly these things need to come out of the headers all together. Note. A number of the death to warnings cleanups have actually generated code that will not compile if the appropriate #if is enabled. In particular unless a new block is declared variables cannot be declared after code is present. So adding an extra { } inside the #ifdef is probably the right thing todo. Eric |