Patchwork [U-Boot] 4xx_enet.c: fix GCC 4.6 build warnings

login
register
mail settings
Submitter Wolfgang Denk
Date Oct. 29, 2011, 7:37 p.m.
Message ID <1319917076-14202-1-git-send-email-wd@denx.de>
Download mbox | patch
Permalink /patch/122564/
State Accepted
Commit f4d9f2da2a3084af2db987874bb282b51df2f755
Headers show

Comments

Wolfgang Denk - Oct. 29, 2011, 7:37 p.m.
Fix:
4xx_enet.c: In function 'enet_rcv':
4xx_enet.c:1772:21: warning: variable 'ef_ptr' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
---
 drivers/net/4xx_enet.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
Wolfgang Denk - Nov. 3, 2011, 7:40 p.m.
Dear Wolfgang Denk,

In message <1319917076-14202-1-git-send-email-wd@denx.de> you wrote:
> Fix:
> 4xx_enet.c: In function 'enet_rcv':
> 4xx_enet.c:1772:21: warning: variable 'ef_ptr' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Stefan Roese <sr@denx.de>
> ---
>  drivers/net/4xx_enet.c |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/drivers/net/4xx_enet.c b/drivers/net/4xx_enet.c
index 8013ad9..a771139 100644
--- a/drivers/net/4xx_enet.c
+++ b/drivers/net/4xx_enet.c
@@ -1769,7 +1769,6 @@  static void emac_err (struct eth_device *dev, unsigned long isr)
  *-----------------------------------------------------------------------------*/
 static void enet_rcv (struct eth_device *dev, unsigned long malisr)
 {
-	struct enet_frame *ef_ptr;
 	unsigned long data_len;
 	unsigned long rx_eob_isr;
 	EMAC_4XX_HW_PST hw_p = dev->priv;
@@ -1828,8 +1827,6 @@  static void enet_rcv (struct eth_device *dev, unsigned long malisr)
 			} else {
 				hw_p->stats.rx_frames++;
 				hw_p->stats.rx += data_len;
-				ef_ptr = (struct enet_frame *) hw_p->rx[i].
-					data_ptr;
 #ifdef INFO_4XX_ENET
 				hw_p->stats.pkts_rx++;
 #endif