Patchwork [U-Boot,04/22] drivers/net/rtl8169.c: Fix GCC 4.6 build warning

login
register
mail settings
Submitter Wolfgang Denk
Date Nov. 5, 2011, 3:13 p.m.
Message ID <1320505999-9770-5-git-send-email-wd@denx.de>
Download mbox | patch
Permalink /patch/123865/
State Accepted
Commit afb92010b26c2089c8cf52fa17b505ea659cf5f0
Headers show

Comments

Wolfgang Denk - Nov. 5, 2011, 3:13 p.m.
Fix:
rtl8169.c: In function 'rtl_init':
rtl8169.c:742:13: warning: variable 'printed_version' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
---
 drivers/net/rtl8169.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
Wolfgang Denk - Nov. 7, 2011, 9:18 p.m.
Dear Wolfgang Denk,

In message <1320505999-9770-5-git-send-email-wd@denx.de> you wrote:
> Fix:
> rtl8169.c: In function 'rtl_init':
> rtl8169.c:742:13: warning: variable 'printed_version' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
>  drivers/net/rtl8169.c |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c
index b81dcad..1ad13bd 100644
--- a/drivers/net/rtl8169.c
+++ b/drivers/net/rtl8169.c
@@ -739,7 +739,6 @@  INIT - Look for an adapter, this routine's visible to the outside
 static int rtl_init(struct eth_device *dev, bd_t *bis)
 {
 	static int board_idx = -1;
-	static int printed_version = 0;
 	int i, rc;
 	int option = -1, Cap10_100 = 0, Cap1000 = 0;
 
@@ -751,8 +750,6 @@  static int rtl_init(struct eth_device *dev, bd_t *bis)
 
 	board_idx++;
 
-	printed_version = 1;
-
 	/* point to private storage */
 	tpc = &tpx;