net/net.c: Fix GCC 4.6 build warning
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>
This commit is contained in:
parent
250b66e2ce
commit
5c10419cea
|
@ -1080,7 +1080,6 @@ CDPHandler(const uchar *pkt, unsigned len)
|
||||||
const uchar *t;
|
const uchar *t;
|
||||||
const ushort *ss;
|
const ushort *ss;
|
||||||
ushort type, tlen;
|
ushort type, tlen;
|
||||||
uchar applid;
|
|
||||||
ushort vlan, nvlan;
|
ushort vlan, nvlan;
|
||||||
|
|
||||||
/* minimum size? */
|
/* minimum size? */
|
||||||
|
@ -1152,11 +1151,10 @@ CDPHandler(const uchar *pkt, unsigned len)
|
||||||
if (tlen < 3)
|
if (tlen < 3)
|
||||||
goto pkt_short;
|
goto pkt_short;
|
||||||
|
|
||||||
applid = t[0];
|
|
||||||
ss = (const ushort *)(t + 1);
|
ss = (const ushort *)(t + 1);
|
||||||
|
|
||||||
#ifdef CONFIG_CDP_APPLIANCE_VLAN_TYPE
|
#ifdef CONFIG_CDP_APPLIANCE_VLAN_TYPE
|
||||||
if (applid == CONFIG_CDP_APPLIANCE_VLAN_TYPE)
|
if (t[0] == CONFIG_CDP_APPLIANCE_VLAN_TYPE)
|
||||||
vlan = *ss;
|
vlan = *ss;
|
||||||
#else
|
#else
|
||||||
/* XXX will this work; dunno */
|
/* XXX will this work; dunno */
|
||||||
|
|
Loading…
Reference in New Issue