mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-27 12:35:26 +00:00
Small corrections to some debugging statements, to pacify compiler.
This commit is contained in:
parent
1121f2b7f7
commit
a4f5673ff3
@ -418,7 +418,7 @@ lwip_recvfrom(int s, void *mem, int len, unsigned int flags,
|
|||||||
ip_addr_debug_print(SOCKETS_DEBUG, addr);
|
ip_addr_debug_print(SOCKETS_DEBUG, addr);
|
||||||
LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%u len=%u\n", port, copylen));
|
LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%u len=%u\n", port, copylen));
|
||||||
} else {
|
} else {
|
||||||
#if SOCKETS_DEBUG > 0
|
#if SOCKETS_DEBUG != 0
|
||||||
addr = netbuf_fromaddr(buf);
|
addr = netbuf_fromaddr(buf);
|
||||||
port = netbuf_fromport(buf);
|
port = netbuf_fromport(buf);
|
||||||
|
|
||||||
@ -1309,7 +1309,7 @@ int lwip_setsockopt (int s, int level, int optname, const void *optval, socklen_
|
|||||||
break;
|
break;
|
||||||
case TCP_KEEPALIVE:
|
case TCP_KEEPALIVE:
|
||||||
sock->conn->pcb.tcp->keepalive = (u32_t)(*(int*)optval);
|
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;
|
break;
|
||||||
} /* switch */
|
} /* switch */
|
||||||
break;
|
break;
|
||||||
|
@ -243,7 +243,7 @@ ip_reass(struct pbuf *p)
|
|||||||
variable. */
|
variable. */
|
||||||
LWIP_DEBUGF(IP_REASS_DEBUG,
|
LWIP_DEBUGF(IP_REASS_DEBUG,
|
||||||
("ip_reass: memcpy from %p (%d) to %p, %d bytes\n",
|
("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));
|
q->len > ip_reasslen - i ? ip_reasslen - i : q->len));
|
||||||
memcpy(q->payload, &ip_reassbuf[i],
|
memcpy(q->payload, &ip_reassbuf[i],
|
||||||
q->len > ip_reasslen - i ? ip_reasslen - i : q->len);
|
q->len > ip_reasslen - i ? ip_reasslen - i : q->len);
|
||||||
|
@ -482,8 +482,8 @@ pbuf_header(struct pbuf *p, s16_t header_size_increment)
|
|||||||
/* boundary check fails? */
|
/* boundary check fails? */
|
||||||
if ((u8_t *)p->payload < (u8_t *)p + sizeof(struct pbuf)) {
|
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",
|
LWIP_DEBUGF( PBUF_DEBUG | 2, ("pbuf_header: failed as %p < %p (not enough space for new header size)\n",
|
||||||
(u8_t *)p->payload,
|
(void *)p->payload,
|
||||||
(u8_t *)p + sizeof(struct pbuf)) );\
|
(void *)(p + 1)));\
|
||||||
/* restore old payload pointer */
|
/* restore old payload pointer */
|
||||||
p->payload = payload;
|
p->payload = payload;
|
||||||
/* bail out unsuccesfully */
|
/* bail out unsuccesfully */
|
||||||
@ -750,9 +750,11 @@ pbuf_queue(struct pbuf *p, struct pbuf *n)
|
|||||||
p->next = n;
|
p->next = n;
|
||||||
/* n is now referenced to by the (packet p in the) queue */
|
/* n is now referenced to by the (packet p in the) queue */
|
||||||
pbuf_ref(n);
|
pbuf_ref(n);
|
||||||
|
#if PBUF_DEBUG
|
||||||
LWIP_DEBUGF(PBUF_DEBUG | DBG_FRESH | 2,
|
LWIP_DEBUGF(PBUF_DEBUG | DBG_FRESH | 2,
|
||||||
("pbuf_queue: newly queued packet %p sits after packet %p in queue %p\n",
|
("pbuf_queue: newly queued packet %p sits after packet %p in queue %p\n",
|
||||||
(void *)n, (void *)p, (void *)q));
|
(void *)n, (void *)p, (void *)q));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -605,7 +605,7 @@ tcp_keepalive(struct tcp_pcb *pcb)
|
|||||||
ip4_addr1(&pcb->remote_ip), ip4_addr2(&pcb->remote_ip),
|
ip4_addr1(&pcb->remote_ip), ip4_addr2(&pcb->remote_ip),
|
||||||
ip4_addr3(&pcb->remote_ip), ip4_addr4(&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);
|
p = pbuf_alloc(PBUF_IP, TCP_HLEN, PBUF_RAM);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user