lwip: fix gcc -fanalyzer warnings

This commit is contained in:
Alexey Lapshin
2024-05-16 23:55:37 +04:00
committed by David Čermák
parent f174681317
commit 4297782bf9
2 changed files with 5 additions and 1 deletions
+4 -1
View File
@@ -389,9 +389,12 @@ icmp6_send_response_with_addrs_and_netif(struct pbuf *p, u8_t code, u32_t data,
{
struct pbuf *q;
struct icmp6_hdr *icmp6hdr;
u16_t datalen = LWIP_MIN(p->tot_len, LWIP_ICMP6_DATASIZE);
u16_t datalen;
u16_t offset;
LWIP_ASSERT("pbuf is NULL", p != NULL);
datalen = LWIP_MIN(p->tot_len, LWIP_ICMP6_DATASIZE);
/* ICMPv6 header + datalen (as much of the offending packet as possible) */
q = pbuf_alloc(PBUF_IP, sizeof(struct icmp6_hdr) + datalen,
PBUF_RAM);
+1
View File
@@ -545,6 +545,7 @@ udp_sendto_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip,
if (IP_IS_V4MAPPEDV6(dst_ip)) {
ip_addr_t dest_ipv4;
unmap_ipv4_mapped_ipv6(ip_2_ip4(&dest_ipv4), ip_2_ip6(dst_ip));
IP_SET_TYPE_VAL(dest_ipv4, IPADDR_TYPE_V4);
#if LWIP_CHECKSUM_ON_COPY
return udp_sendto_chksum(pcb, p, &dest_ipv4, dst_port, have_chksum, chksum);
#else