mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-04-17 02:42:29 +00:00
Fixed unused variable warnings produced with the last commit
This commit is contained in:
parent
4fca628d36
commit
c6605766e7
@ -329,7 +329,7 @@ netconn_accept(struct netconn *conn, struct netconn **new_conn)
|
||||
/* Let the stack know that we have accepted the connection. */
|
||||
msg.msg.conn = conn;
|
||||
/* don't care for the return value of do_recv */
|
||||
TCPIP_APIMSG(&msg, do_recv, err);
|
||||
TCPIP_APIMSG_NOERR(&msg, do_recv);
|
||||
#endif /* TCP_LISTEN_BACKLOG */
|
||||
|
||||
*new_conn = newconn;
|
||||
@ -400,7 +400,7 @@ netconn_recv_data(struct netconn *conn, void **new_buf)
|
||||
msg.msg.msg.r.len = 1;
|
||||
}
|
||||
/* don't care for the return value of do_recv */
|
||||
TCPIP_APIMSG(&msg, do_recv, err);
|
||||
TCPIP_APIMSG_NOERR(&msg, do_recv);
|
||||
}
|
||||
|
||||
/* If we are closed, we indicate that we no longer wish to use the socket */
|
||||
@ -532,14 +532,13 @@ netconn_recved(struct netconn *conn, u32_t length)
|
||||
if ((conn != NULL) && (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) &&
|
||||
(netconn_get_noautorecved(conn))) {
|
||||
struct api_msg msg;
|
||||
err_t err;
|
||||
/* Let the stack know that we have taken the data. */
|
||||
/* TODO: Speedup: Don't block and wait for the answer here
|
||||
(to prevent multiple thread-switches). */
|
||||
msg.msg.conn = conn;
|
||||
msg.msg.msg.r.len = length;
|
||||
/* don't care for the return value of do_recv */
|
||||
TCPIP_APIMSG(&msg, do_recv, err);
|
||||
TCPIP_APIMSG_NOERR(&msg, do_recv);
|
||||
}
|
||||
#else /* LWIP_TCP */
|
||||
LWIP_UNUSED_ARG(conn);
|
||||
|
@ -64,11 +64,14 @@ extern sys_mutex_t lock_tcpip_core;
|
||||
#else
|
||||
#define TCIP_APIMSG_SET_ERR(m, e)
|
||||
#endif
|
||||
#define TCPIP_APIMSG(m,f,e) do { \
|
||||
#define TCPIP_APIMSG_NOERR(m,f) do { \
|
||||
TCIP_APIMSG_SET_ERR(m, ERR_VAL); \
|
||||
LOCK_TCPIP_CORE(); \
|
||||
f(&((m)->msg)); \
|
||||
UNLOCK_TCPIP_CORE(); \
|
||||
} while(0)
|
||||
#define TCPIP_APIMSG(m,f,e) do { \
|
||||
TCPIP_APIMSG_NOERR(m,f); \
|
||||
(e) = (m)->msg.err; \
|
||||
} while(0)
|
||||
#define TCPIP_APIMSG_ACK(m)
|
||||
@ -77,6 +80,7 @@ extern sys_mutex_t lock_tcpip_core;
|
||||
#else /* LWIP_TCPIP_CORE_LOCKING */
|
||||
#define LOCK_TCPIP_CORE()
|
||||
#define UNLOCK_TCPIP_CORE()
|
||||
#define TCPIP_APIMSG_NOERR(m,f) do { (m)->function = f; tcpip_apimsg(m); } while(0)
|
||||
#define TCPIP_APIMSG(m,f,e) do { (m)->function = f; (e) = tcpip_apimsg(m); } while(0)
|
||||
#define TCPIP_APIMSG_ACK(m) sys_sem_signal(&m->conn->op_completed)
|
||||
#define TCPIP_NETIFAPI(m) tcpip_netifapi(m)
|
||||
|
Loading…
x
Reference in New Issue
Block a user