Re: [Etherboot-developers] tidy ups
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: Georg B. <Geo...@po...> - 2003-03-17 07:31:13
|
----- Original Message ----- From: ke...@us... Date: Monday, March 17, 2003 2:24 am Subject: [Etherboot-developers] tidy ups > Does anybody know how to declare the unused attribute on function > parameters, and just as important, does it work with older gcc > versionslike 2.95? I think it works in 2.95, and the syntax is __attribute__ ((unused)) > Does anybody know how to get rid of these warnings? I assume this is > because they are now predeclared in gcc 3.x? > > 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 They are there because the definition of strlen/strcmp is non static, but the declaration in the hedaer file is static. If you change "static" to "extern" in the header file, the warnings go away. I wonder why the "static" is in the header file at all? Georg |