]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
4xx_enet.c: Fix GCC 4.6 build warnings
authorStefan Roese <sr@denx.de>
Tue, 15 Nov 2011 08:01:58 +0000 (08:01 +0000)
committerWolfgang Denk <wd@denx.de>
Wed, 16 Nov 2011 20:14:14 +0000 (21:14 +0100)
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 <sr@denx.de>
drivers/net/4xx_enet.c

index a7711390b08603e74380442b831ab70b56079b64..73700dd0dfb44a093517147b6febfb29a409edff 100644 (file)
@@ -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;