mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-25 07:33:11 +00:00
Minor: fixed argument casts for mbox_fetch parameters (to fix compiler warnings)
This commit is contained in:
parent
34139606ca
commit
cc1e9370af
@ -288,12 +288,12 @@ netconn_accept(struct netconn *conn, struct netconn **new_conn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if LWIP_SO_RCVTIMEO
|
#if LWIP_SO_RCVTIMEO
|
||||||
if (sys_arch_mbox_fetch(conn->acceptmbox, (void *)&newconn, conn->recv_timeout) == SYS_ARCH_TIMEOUT) {
|
if (sys_arch_mbox_fetch(conn->acceptmbox, (void **)&newconn, conn->recv_timeout) == SYS_ARCH_TIMEOUT) {
|
||||||
NETCONN_SET_SAFE_ERR(conn, ERR_TIMEOUT);
|
NETCONN_SET_SAFE_ERR(conn, ERR_TIMEOUT);
|
||||||
return ERR_TIMEOUT;
|
return ERR_TIMEOUT;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
sys_arch_mbox_fetch(conn->acceptmbox, (void *)&newconn, 0);
|
sys_arch_mbox_fetch(conn->acceptmbox, (void **)&newconn, 0);
|
||||||
#endif /* LWIP_SO_RCVTIMEO*/
|
#endif /* LWIP_SO_RCVTIMEO*/
|
||||||
/* Register event with callback */
|
/* Register event with callback */
|
||||||
API_EVENT(conn, NETCONN_EVT_RCVMINUS, 0);
|
API_EVENT(conn, NETCONN_EVT_RCVMINUS, 0);
|
||||||
@ -356,13 +356,13 @@ netconn_recv(struct netconn *conn, struct netbuf **new_buf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if LWIP_SO_RCVTIMEO
|
#if LWIP_SO_RCVTIMEO
|
||||||
if (sys_arch_mbox_fetch(conn->recvmbox, (void *)&p, conn->recv_timeout)==SYS_ARCH_TIMEOUT) {
|
if (sys_arch_mbox_fetch(conn->recvmbox, (void **)&p, conn->recv_timeout)==SYS_ARCH_TIMEOUT) {
|
||||||
memp_free(MEMP_NETBUF, buf);
|
memp_free(MEMP_NETBUF, buf);
|
||||||
NETCONN_SET_SAFE_ERR(conn, ERR_TIMEOUT);
|
NETCONN_SET_SAFE_ERR(conn, ERR_TIMEOUT);
|
||||||
return ERR_TIMEOUT;
|
return ERR_TIMEOUT;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
sys_arch_mbox_fetch(conn->recvmbox, (void *)&p, 0);
|
sys_arch_mbox_fetch(conn->recvmbox, (void **)&p, 0);
|
||||||
#endif /* LWIP_SO_RCVTIMEO*/
|
#endif /* LWIP_SO_RCVTIMEO*/
|
||||||
|
|
||||||
if (p != NULL) {
|
if (p != NULL) {
|
||||||
@ -405,12 +405,12 @@ netconn_recv(struct netconn *conn, struct netbuf **new_buf)
|
|||||||
} else {
|
} else {
|
||||||
#if (LWIP_UDP || LWIP_RAW)
|
#if (LWIP_UDP || LWIP_RAW)
|
||||||
#if LWIP_SO_RCVTIMEO
|
#if LWIP_SO_RCVTIMEO
|
||||||
if (sys_arch_mbox_fetch(conn->recvmbox, (void *)&buf, conn->recv_timeout)==SYS_ARCH_TIMEOUT) {
|
if (sys_arch_mbox_fetch(conn->recvmbox, (void **)&buf, conn->recv_timeout)==SYS_ARCH_TIMEOUT) {
|
||||||
NETCONN_SET_SAFE_ERR(conn, ERR_TIMEOUT);
|
NETCONN_SET_SAFE_ERR(conn, ERR_TIMEOUT);
|
||||||
return ERR_TIMEOUT;
|
return ERR_TIMEOUT;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
sys_arch_mbox_fetch(conn->recvmbox, (void *)&buf, 0);
|
sys_arch_mbox_fetch(conn->recvmbox, (void **)&buf, 0);
|
||||||
#endif /* LWIP_SO_RCVTIMEO*/
|
#endif /* LWIP_SO_RCVTIMEO*/
|
||||||
LWIP_ASSERT("buf != NULL", buf != NULL);
|
LWIP_ASSERT("buf != NULL", buf != NULL);
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ tcpip_thread(void *arg)
|
|||||||
while (1) { /* MAIN Loop */
|
while (1) { /* MAIN Loop */
|
||||||
UNLOCK_TCPIP_CORE();
|
UNLOCK_TCPIP_CORE();
|
||||||
/* wait for a message, timeouts are processed while waiting */
|
/* wait for a message, timeouts are processed while waiting */
|
||||||
sys_timeouts_mbox_fetch(mbox, (void *)&msg);
|
sys_timeouts_mbox_fetch(mbox, (void **)&msg);
|
||||||
LOCK_TCPIP_CORE();
|
LOCK_TCPIP_CORE();
|
||||||
switch (msg->type) {
|
switch (msg->type) {
|
||||||
#if LWIP_NETCONN
|
#if LWIP_NETCONN
|
||||||
|
Loading…
Reference in New Issue
Block a user