diff --git a/src/api/sockets.c b/src/api/sockets.c index 18f15a21..b3dfdc2f 100644 --- a/src/api/sockets.c +++ b/src/api/sockets.c @@ -418,7 +418,7 @@ lwip_recvfrom(int s, void *mem, int len, unsigned int flags, ip_addr_debug_print(SOCKETS_DEBUG, addr); LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%u len=%u\n", port, copylen)); } else { -#if SOCKETS_DEBUG > 0 +#if SOCKETS_DEBUG != 0 addr = netbuf_fromaddr(buf); port = netbuf_fromport(buf); @@ -1309,7 +1309,7 @@ int lwip_setsockopt (int s, int level, int optname, const void *optval, socklen_ break; case TCP_KEEPALIVE: sock->conn->pcb.tcp->keepalive = (u32_t)(*(int*)optval); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_TCP, TCP_KEEPALIVE) -> %u\n", s, sock->conn->pcb.tcp->keepalive)); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_TCP, TCP_KEEPALIVE) -> %lu\n", s, sock->conn->pcb.tcp->keepalive)); break; } /* switch */ break; diff --git a/src/core/ipv4/ip_frag.c b/src/core/ipv4/ip_frag.c index bf219ebe..caa97a85 100644 --- a/src/core/ipv4/ip_frag.c +++ b/src/core/ipv4/ip_frag.c @@ -243,7 +243,7 @@ ip_reass(struct pbuf *p) variable. */ LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass: memcpy from %p (%d) to %p, %d bytes\n", - &ip_reassbuf[i], i, q->payload, + (void *)&ip_reassbuf[i], i, q->payload, q->len > ip_reasslen - i ? ip_reasslen - i : q->len)); memcpy(q->payload, &ip_reassbuf[i], q->len > ip_reasslen - i ? ip_reasslen - i : q->len); diff --git a/src/core/pbuf.c b/src/core/pbuf.c index 7cf22c98..a5749e0b 100644 --- a/src/core/pbuf.c +++ b/src/core/pbuf.c @@ -482,8 +482,8 @@ pbuf_header(struct pbuf *p, s16_t header_size_increment) /* boundary check fails? */ if ((u8_t *)p->payload < (u8_t *)p + sizeof(struct pbuf)) { LWIP_DEBUGF( PBUF_DEBUG | 2, ("pbuf_header: failed as %p < %p (not enough space for new header size)\n", - (u8_t *)p->payload, - (u8_t *)p + sizeof(struct pbuf)) );\ + (void *)p->payload, + (void *)(p + 1)));\ /* restore old payload pointer */ p->payload = payload; /* bail out unsuccesfully */ @@ -750,9 +750,11 @@ pbuf_queue(struct pbuf *p, struct pbuf *n) p->next = n; /* n is now referenced to by the (packet p in the) queue */ pbuf_ref(n); +#if PBUF_DEBUG LWIP_DEBUGF(PBUF_DEBUG | DBG_FRESH | 2, ("pbuf_queue: newly queued packet %p sits after packet %p in queue %p\n", (void *)n, (void *)p, (void *)q)); +#endif } /** diff --git a/src/core/tcp_out.c b/src/core/tcp_out.c index a356fc21..bea45dee 100644 --- a/src/core/tcp_out.c +++ b/src/core/tcp_out.c @@ -605,7 +605,7 @@ tcp_keepalive(struct tcp_pcb *pcb) ip4_addr1(&pcb->remote_ip), ip4_addr2(&pcb->remote_ip), ip4_addr3(&pcb->remote_ip), ip4_addr4(&pcb->remote_ip))); - LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: tcp_ticks %ld pcb->tmr %ld pcb->keep_cnt %ld\n", tcp_ticks, pcb->tmr, pcb->keep_cnt)); + LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: tcp_ticks %lu pcb->tmr %lu pcb->keep_cnt %u\n", tcp_ticks, pcb->tmr, pcb->keep_cnt)); p = pbuf_alloc(PBUF_IP, TCP_HLEN, PBUF_RAM);