mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-11 01:53:48 +08:00
Introduced #define LWIP_UNUSED_ARG(x) use this for and architecture-independent form to tell the compiler you intentionally are not using this variable. Can be overriden in cc.h.
This commit is contained in:
@@ -1197,7 +1197,9 @@ static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, struct ip_
|
||||
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("pbuf->len = %"U16_F"\n", p->len));
|
||||
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("pbuf->tot_len = %"U16_F"\n", p->tot_len));
|
||||
/* prevent warnings about unused arguments */
|
||||
(void)pcb; (void)addr; (void)port;
|
||||
LWIP_UNUSED_ARG(pcb);
|
||||
LWIP_UNUSED_ARG(addr);
|
||||
LWIP_UNUSED_ARG(port);
|
||||
dhcp->p = p;
|
||||
/* TODO: check packet length before reading them */
|
||||
if (reply_msg->op != DHCP_BOOTREPLY) {
|
||||
|
||||
@@ -801,7 +801,7 @@ snmp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, struct ip_addr *addr,
|
||||
struct udp_hdr *udphdr;
|
||||
|
||||
/* suppress unused argument warning */
|
||||
if (arg);
|
||||
LWIP_UNUSED_ARG(arg);
|
||||
/* peek in the UDP header (goto IP payload) */
|
||||
if(pbuf_header(p, UDP_HLEN)){
|
||||
LWIP_ASSERT("Can't move to UDP header", 0);
|
||||
|
||||
Reference in New Issue
Block a user