Fix some warnings discovered by compiling the unixsim under cygwin (gcc pedantic)
This commit is contained in:
@@ -469,7 +469,7 @@ lwip_recvfrom(int s, void *mem, int len, unsigned int flags,
|
||||
return -1;
|
||||
|
||||
do {
|
||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: top while sock->lastdata=%p\n", sock->lastdata));
|
||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: top while sock->lastdata=%p\n", (void*)sock->lastdata));
|
||||
/* Check if there is data left from the last recv operation. */
|
||||
if (sock->lastdata) {
|
||||
buf = sock->lastdata;
|
||||
@@ -484,7 +484,7 @@ lwip_recvfrom(int s, void *mem, int len, unsigned int flags,
|
||||
/* No data was left from the previous operation, so we try to get
|
||||
some from the network. */
|
||||
sock->lastdata = buf = netconn_recv(sock->conn);
|
||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: netconn_recv netbuf=%p\n", buf));
|
||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: netconn_recv netbuf=%p\n", (void*)buf));
|
||||
|
||||
if (!buf) {
|
||||
/* We should really do some error checking here. */
|
||||
@@ -528,11 +528,11 @@ lwip_recvfrom(int s, void *mem, int len, unsigned int flags,
|
||||
if ((sock->conn->type == NETCONN_TCP) && (buflen - copylen > 0)) {
|
||||
sock->lastdata = buf;
|
||||
sock->lastoffset += copylen;
|
||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: lastdata now netbuf=%p\n", buf));
|
||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: lastdata now netbuf=%p\n", (void*)buf));
|
||||
} else {
|
||||
sock->lastdata = NULL;
|
||||
sock->lastoffset = 0;
|
||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: deleting netbuf=%p\n", buf));
|
||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: deleting netbuf=%p\n", (void*)buf));
|
||||
netbuf_delete(buf);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user