From f0813ab128a6f3e651454f4fca39bce32c90fe62 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Tue, 15 Nov 2011 08:01:58 +0000 Subject: [PATCH] 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 --- drivers/net/4xx_enet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/4xx_enet.c b/drivers/net/4xx_enet.c index a7711390b0..73700dd0df 100644 --- a/drivers/net/4xx_enet.c +++ b/drivers/net/4xx_enet.c @@ -92,6 +92,7 @@ #include #include #include +#include #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; -- 2.39.5