Minor fix (warning when LWIP_DEBUG is undefined)

This commit is contained in:
fbernon 2007-07-29 08:31:31 +00:00
parent 1edd2ed3db
commit f1c4a9ebfa

View File

@ -56,7 +56,9 @@ void
icmp_input(struct pbuf *p, struct netif *inp) icmp_input(struct pbuf *p, struct netif *inp)
{ {
u8_t type; u8_t type;
#ifdef LWIP_DEBUG
u8_t code; u8_t code;
#endif /* LWIP_DEBUG */
struct icmp_echo_hdr *iecho; struct icmp_echo_hdr *iecho;
struct ip_hdr *iphdr; struct ip_hdr *iphdr;
struct ip_addr tmpaddr; struct ip_addr tmpaddr;
@ -74,7 +76,9 @@ icmp_input(struct pbuf *p, struct netif *inp)
} }
type = *((u8_t *)p->payload); type = *((u8_t *)p->payload);
#ifdef LWIP_DEBUG
code = *(((u8_t *)p->payload)+1); code = *(((u8_t *)p->payload)+1);
#endif /* LWIP_DEBUG */
switch (type) { switch (type) {
case ICMP_ECHO: case ICMP_ECHO:
/* broadcast or multicast destination address? */ /* broadcast or multicast destination address? */