From e25c9f7951ac5b3d1712081ffbd88cb6872902c3 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Mon, 15 Mar 2010 09:47:43 +0000 Subject: [PATCH] Fixed compiler warning when LWIP_SNMP==0 --- src/core/netif.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/netif.c b/src/core/netif.c index 0036842b..f190b1f2 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -596,11 +596,13 @@ netif_loop_output(struct netif *netif, struct pbuf *p, #endif /* LWIP_LOOPBACK_MAX_PBUFS */ /* If we have a loopif, SNMP counters are adjusted for it, * if not they are adjusted for 'netif'. */ +#if LWIP_SNMP #if LWIP_HAVE_LOOPIF struct netif *stats_if = &loop_netif; #else /* LWIP_HAVE_LOOPIF */ struct netif *stats_if = netif; #endif /* LWIP_HAVE_LOOPIF */ +#endif /* LWIP_SNMP */ SYS_ARCH_DECL_PROTECT(lev); LWIP_UNUSED_ARG(ipaddr); @@ -676,11 +678,13 @@ netif_poll(struct netif *netif) struct pbuf *in; /* If we have a loopif, SNMP counters are adjusted for it, * if not they are adjusted for 'netif'. */ +#if LWIP_SNMP #if LWIP_HAVE_LOOPIF struct netif *stats_if = &loop_netif; #else /* LWIP_HAVE_LOOPIF */ struct netif *stats_if = netif; #endif /* LWIP_HAVE_LOOPIF */ +#endif /* LWIP_SNMP */ SYS_ARCH_DECL_PROTECT(lev); do {