diff mbox

[U-Boot,38/56] net/net.c: Fix GCC 4.6 build warning

Message ID 1320458160-23136-39-git-send-email-wd@denx.de
State Accepted
Commit 5c10419cead8f900e106046f6574cfeab7887e44
Headers show

Commit Message

Wolfgang Denk Nov. 5, 2011, 1:55 a.m. UTC
Fix:
net.c: In function 'CDPHandler':
net.c:1083:8: warning: variable 'applid' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
---
 net/net.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

Comments

Wolfgang Denk Nov. 7, 2011, 9:14 p.m. UTC | #1
Dear Wolfgang Denk,

In message <1320458160-23136-39-git-send-email-wd@denx.de> you wrote:
> Fix:
> net.c: In function 'CDPHandler':
> net.c:1083:8: warning: variable 'applid' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
>  net/net.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/net/net.c b/net/net.c
index 8f55281..d0fe1c4 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1080,7 +1080,6 @@  CDPHandler(const uchar *pkt, unsigned len)
 	const uchar *t;
 	const ushort *ss;
 	ushort type, tlen;
-	uchar applid;
 	ushort vlan, nvlan;
 
 	/* minimum size? */
@@ -1152,11 +1151,10 @@  CDPHandler(const uchar *pkt, unsigned len)
 				if (tlen < 3)
 					goto pkt_short;
 
-				applid = t[0];
 				ss = (const ushort *)(t + 1);
 
 #ifdef CONFIG_CDP_APPLIANCE_VLAN_TYPE
-				if (applid == CONFIG_CDP_APPLIANCE_VLAN_TYPE)
+				if (t[0] == CONFIG_CDP_APPLIANCE_VLAN_TYPE)
 					vlan = *ss;
 #else
 				/* XXX will this work; dunno */