4xx_enet.c: Fix GCC 4.6 build warnings
PATCH 3/19 4xx_enet.c: Fix GCC 4.6 build warnings
Fix:4xx_enet.c: In function 'ppc_4xx_eth_init':
4xx_enet.c:875:6: warning: variable 'ethgroup' set but not used [-Wunused-but-set-variable]
I used "__maybe_unused" here intentionally, since all other alternatives to fix this compilation warning would result in more ifdef's.
Signed-off-by Stefan Roese <[email protected]>
--- drivers/net/4xx_enet.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/net/4xx_enet.c +2 -1
@@ -92,6 +92,7 @@#include <asm/ppc4xx-mal.h> #include <miiphy.h> #include <malloc.h> +#include <linux/compiler.h> #if !(defined(CONFIG_MII ) || defined(CONFIG_CMD_MII ))#error "CONFIG_MII has to be defined!"
@@ -872,7 +873,7 @@ static int ppc_4xx_eth_init (struct eth_device *dev, bd_t * bis)defined (CONFIG_440EPX ) ||defined (CONFIG_440GRX ) || \defined (CONFIG_460EX ) ||defined (CONFIG_460GT ) || \ defined(CONFIG_405EX) -int ethgroup =-1 ; +__maybe_unused int ethgroup =-1 ;#endif #endif u32 bd_cached;
Signature · 1 line
1.7.7.3
Wolfgang Denk
AppliedPATCH 3/19 4xx_enet.c: Fix GCC 4.6 build warnings
Dear Stefan Roese,
Quoted 4 lines · In message <[email protected]> you wrote:
Fix:
4xx_enet.c: In function 'ppc_4xx_eth_init':
4xx_enet.c:875:6: warning: variable 'ethgroup' set but not used [-Wunused-but-set-variable]
Quoted 8 lines
I used "
__maybe_unused" here intentionally, since all other alternatives to fix this compilation warning would result in more ifdef's.Signed-off-by Stefan Roese <[email protected]>--- drivers/net/4xx_enet.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de If A equals success, then the formula is A = X + Y + Z. X is work. Y is play. Z is keep your mouth shut. - Albert Einstein