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:
goldsimon
2007-04-04 19:54:22 +00:00
parent f8aa14d402
commit f6bdd2cae4
6 changed files with 21 additions and 8 deletions

View File

@@ -47,7 +47,8 @@ recv_raw(void *arg, struct raw_pcb *pcb, struct pbuf *p,
struct netconn *conn;
conn = arg;
if (!conn) return 0;
if (!conn)
return 0;
if (conn->recvmbox != SYS_MBOX_NULL) {
if (!(buf = memp_malloc(MEMP_NETBUF))) {
@@ -78,7 +79,7 @@ recv_udp(void *arg, struct udp_pcb *pcb, struct pbuf *p,
struct netbuf *buf;
struct netconn *conn;
pcb = pcb; /* Remove warning */
LWIP_UNUSED_ARG(pcb);
conn = arg;
@@ -115,7 +116,7 @@ recv_tcp(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err)
struct netconn *conn;
u16_t len;
pcb = pcb; /* Remove warning */
LWIP_UNUSED_ARG(pcb);
conn = arg;
@@ -147,7 +148,7 @@ poll_tcp(void *arg, struct tcp_pcb *pcb)
{
struct netconn *conn;
pcb = pcb; /* Remove warning */
LWIP_UNUSED_ARG(pcb);
conn = arg;
@@ -164,7 +165,7 @@ sent_tcp(void *arg, struct tcp_pcb *pcb, u16_t len)
{
struct netconn *conn;
pcb = pcb; /* Remove warning */
LWIP_UNUSED_ARG(pcb);
conn = arg;
@@ -445,7 +446,7 @@ do_connected(void *arg, struct tcp_pcb *pcb, err_t err)
{
struct netconn *conn;
pcb = pcb; /* Remove warning */
LWIP_UNUSED_ARG(pcb);
conn = arg;

View File

@@ -323,6 +323,9 @@ lwip_listen(int s, int backlog)
struct lwip_socket *sock;
err_t err;
/* This does no harm. If debugging is off, backlog is unused. */
LWIP_UNUSED_ARG(backlog);
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_listen(%d, backlog=%d)\n", s, backlog));
sock = get_socket(s);
if (!sock)