mirror of
https://github.com/espressif/esp-lwip.git
synced 2026-06-05 21:04:45 +00:00
Fix printf format warnings with strict -Wformat
2.1.3-esp:894e387fFix print format issues repored for -Wformat 2.1.3-esp: partialllyf5c43549lwip_debug: Fixed string format error in ip6 and napt
This commit is contained in:
@@ -828,7 +828,7 @@ ip_napt_forward(struct pbuf *p, struct ip_hdr *iphdr, struct netif *inp, struct
|
||||
if (m->mport != udphdr->src)
|
||||
ip_napt_modify_port_udp(udphdr, 0, m->mport);
|
||||
ip_napt_modify_addr_udp(udphdr, &iphdr->src, m->maddr);
|
||||
LWIP_DEBUGF(NAPT_DEBUG, ("Modify UDP addr %x %x", iphdr->src.addr, m->maddr));
|
||||
LWIP_DEBUGF(NAPT_DEBUG, ("Modify UDP addr %" X32_F " %" X32_F, iphdr->src.addr, m->maddr));
|
||||
ip_napt_modify_addr(iphdr, &iphdr->src, m->maddr);
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
+5
-5
@@ -1464,7 +1464,7 @@ ip6_debug_print(struct pbuf *p)
|
||||
|
||||
LWIP_DEBUGF(IP6_DEBUG, ("IPv6 header:\n"));
|
||||
LWIP_DEBUGF(IP6_DEBUG, ("+-------------------------------+\n"));
|
||||
LWIP_DEBUGF(IP6_DEBUG, ("| %2"U16_F" | %3"U16_F" | %7"U32_F" | (ver, class, flow)\n",
|
||||
LWIP_DEBUGF(IP6_DEBUG, ("| %2"U32_F" | %3"U32_F" | %7"U32_F" | (ver, class, flow)\n",
|
||||
IP6H_V(ip6hdr),
|
||||
IP6H_TC(ip6hdr),
|
||||
IP6H_FL(ip6hdr)));
|
||||
@@ -1474,23 +1474,23 @@ ip6_debug_print(struct pbuf *p)
|
||||
IP6H_NEXTH(ip6hdr),
|
||||
IP6H_HOPLIM(ip6hdr)));
|
||||
LWIP_DEBUGF(IP6_DEBUG, ("+-------------------------------+\n"));
|
||||
LWIP_DEBUGF(IP6_DEBUG, ("| %4"X32_F" | %4"X32_F" | %4"X32_F" | %4"X32_F" | (src)\n",
|
||||
LWIP_DEBUGF(IP6_DEBUG, ("| %4"X16_F" | %4"X16_F" | %4"X16_F" | %4"X16_F" | (src)\n",
|
||||
IP6_ADDR_BLOCK1(&(ip6hdr->src)),
|
||||
IP6_ADDR_BLOCK2(&(ip6hdr->src)),
|
||||
IP6_ADDR_BLOCK3(&(ip6hdr->src)),
|
||||
IP6_ADDR_BLOCK4(&(ip6hdr->src))));
|
||||
LWIP_DEBUGF(IP6_DEBUG, ("| %4"X32_F" | %4"X32_F" | %4"X32_F" | %4"X32_F" |\n",
|
||||
LWIP_DEBUGF(IP6_DEBUG, ("| %4"X16_F" | %4"X16_F" | %4"X16_F" | %4"X16_F" |\n",
|
||||
IP6_ADDR_BLOCK5(&(ip6hdr->src)),
|
||||
IP6_ADDR_BLOCK6(&(ip6hdr->src)),
|
||||
IP6_ADDR_BLOCK7(&(ip6hdr->src)),
|
||||
IP6_ADDR_BLOCK8(&(ip6hdr->src))));
|
||||
LWIP_DEBUGF(IP6_DEBUG, ("+-------------------------------+\n"));
|
||||
LWIP_DEBUGF(IP6_DEBUG, ("| %4"X32_F" | %4"X32_F" | %4"X32_F" | %4"X32_F" | (dest)\n",
|
||||
LWIP_DEBUGF(IP6_DEBUG, ("| %4"X16_F" | %4"X16_F" | %4"X16_F" | %4"X16_F" | (dest)\n",
|
||||
IP6_ADDR_BLOCK1(&(ip6hdr->dest)),
|
||||
IP6_ADDR_BLOCK2(&(ip6hdr->dest)),
|
||||
IP6_ADDR_BLOCK3(&(ip6hdr->dest)),
|
||||
IP6_ADDR_BLOCK4(&(ip6hdr->dest))));
|
||||
LWIP_DEBUGF(IP6_DEBUG, ("| %4"X32_F" | %4"X32_F" | %4"X32_F" | %4"X32_F" |\n",
|
||||
LWIP_DEBUGF(IP6_DEBUG, ("| %4"X16_F" | %4"X16_F" | %4"X16_F" | %4"X16_F" |\n",
|
||||
IP6_ADDR_BLOCK5(&(ip6hdr->dest)),
|
||||
IP6_ADDR_BLOCK6(&(ip6hdr->dest)),
|
||||
IP6_ADDR_BLOCK7(&(ip6hdr->dest)),
|
||||
|
||||
+2
-2
@@ -1603,7 +1603,7 @@ tcp_receive(struct tcp_pcb *pcb)
|
||||
if (pcb->rcv_wnd < TCP_TCPLEN(cseg)) {
|
||||
LWIP_DEBUGF(TCP_INPUT_DEBUG,
|
||||
("tcp_receive: OOSEQ packet out of wnd "
|
||||
"seqno=%"U32_F" wnd =%"U32_F" len=%"U16_F
|
||||
"seqno=%"U32_F" wnd =%"TCPWNDSIZE_F" len=%"U16_F
|
||||
"snd_wl1=%"U32_F" snd_wl2 =%"U32_F" f = %"X16_F" tf=%"U16_F"\n",
|
||||
seqno,pcb->rcv_wnd,cseg->len,pcb->snd_wl1,pcb->snd_wl1,
|
||||
TCPH_FLAGS((cseg)->tcphdr),pcb->flags));
|
||||
@@ -1824,7 +1824,7 @@ tcp_receive(struct tcp_pcb *pcb)
|
||||
if (TCPH_FLAGS(next->next->tcphdr) & TCP_SYN) {
|
||||
LWIP_DEBUGF(TCP_INPUT_DEBUG,
|
||||
("tcp_receive: ooseq not trimmed correctly to rcv_wnd "
|
||||
"seqno=%"U32_F" wnd =%"U32_F" len=%"U16_F
|
||||
"seqno=%"U32_F" wnd =%"TCPWNDSIZE_F" len=%"U16_F
|
||||
"snd_wl1=%"U32_F" snd_wl2 =%"U32_F" f = %"X16_F" tf=%"U16_F"\n",
|
||||
seqno,pcb->rcv_wnd,next->next->len,pcb->snd_wl1,pcb->snd_wl1,
|
||||
TCPH_FLAGS(next->next->tcphdr),pcb->flags));
|
||||
|
||||
+2
-2
@@ -469,7 +469,7 @@ vj_uncompress_uncomp(struct pbuf *nb, struct vjcompress *comp)
|
||||
|| (hlen += TCPH_HDRLEN_BYTES((struct tcp_hdr *)&((char *)ip)[hlen]))
|
||||
> nb->len
|
||||
|| hlen > MAX_HDR) {
|
||||
PPPDEBUG(LOG_INFO, ("vj_uncompress_uncomp: bad cid=%d, hlen=%d buflen=%d\n",
|
||||
PPPDEBUG(LOG_INFO, ("vj_uncompress_uncomp: bad cid=%d, hlen=%" U32_F " buflen=%d\n",
|
||||
IPH_PROTO(ip), hlen, nb->len));
|
||||
vj_uncompress_err(comp);
|
||||
return -1;
|
||||
@@ -596,7 +596,7 @@ vj_uncompress_tcp(struct pbuf **nb, struct vjcompress *comp)
|
||||
* We must have dropped some characters (crc should detect
|
||||
* this but the old slip framing won't)
|
||||
*/
|
||||
PPPDEBUG(LOG_INFO, ("vj_uncompress_tcp: head buffer %d too short %d\n",
|
||||
PPPDEBUG(LOG_INFO, ("vj_uncompress_tcp: head buffer %d too short %" U32_F "\n",
|
||||
n0->len, vjlen));
|
||||
goto bad;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user