From patchwork Tue Nov 15 18:01:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 125835 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 5F1F8B6F81 for ; Wed, 16 Nov 2011 05:02:33 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EB5CB281C5; Tue, 15 Nov 2011 19:02:27 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XNBIdqYUBAiY; Tue, 15 Nov 2011 19:02:27 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1B78A2845C; Tue, 15 Nov 2011 19:02:23 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 77F4C2845C for ; Tue, 15 Nov 2011 19:02:20 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mwg+apTazOv8 for ; Tue, 15 Nov 2011 19:02:20 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mo-p05-ob.rzone.de (mo-p05-ob.rzone.de [81.169.146.181]) by theia.denx.de (Postfix) with ESMTPS id 7C38E28475 for ; Tue, 15 Nov 2011 19:02:09 +0100 (CET) X-RZG-AUTH: :IW0NeWC7b/q2i6W/qstXb1SBUuFnrGoheedClaTaNdBkW0QEactrHijJzVWK3h/vzb0= X-RZG-CLASS-ID: mo05 Received: from kubuntu.fritz.box (pD9FFBA40.dip.t-dialin.net [217.255.186.64]) by smtp.strato.de (klopstock mo19) (RZmta 26.10 AUTH) with ESMTPA id C0406cnAFHCOYd for ; Tue, 15 Nov 2011 19:02:01 +0100 (MET) From: Stefan Roese To: u-boot@lists.denx.de Date: Tue, 15 Nov 2011 19:01:58 +0100 Message-Id: <1321380118-6257-1-git-send-email-sr@denx.de> X-Mailer: git-send-email 1.7.7.3 Subject: [U-Boot] [PATCH 03/19] 4xx_enet.c: Fix GCC 4.6 build warnings X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/net/4xx_enet.c b/drivers/net/4xx_enet.c index a771139..73700dd 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;