mirror of
https://github.com/espressif/esp-lwip.git
synced 2026-09-15 13:40:05 +00:00
lwip: fix gcc -fanalyzer warnings
This commit is contained in:
committed by
David Čermák
parent
f174681317
commit
4297782bf9
@@ -389,9 +389,12 @@ icmp6_send_response_with_addrs_and_netif(struct pbuf *p, u8_t code, u32_t data,
|
|||||||
{
|
{
|
||||||
struct pbuf *q;
|
struct pbuf *q;
|
||||||
struct icmp6_hdr *icmp6hdr;
|
struct icmp6_hdr *icmp6hdr;
|
||||||
u16_t datalen = LWIP_MIN(p->tot_len, LWIP_ICMP6_DATASIZE);
|
u16_t datalen;
|
||||||
u16_t offset;
|
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) */
|
/* ICMPv6 header + datalen (as much of the offending packet as possible) */
|
||||||
q = pbuf_alloc(PBUF_IP, sizeof(struct icmp6_hdr) + datalen,
|
q = pbuf_alloc(PBUF_IP, sizeof(struct icmp6_hdr) + datalen,
|
||||||
PBUF_RAM);
|
PBUF_RAM);
|
||||||
|
|||||||
@@ -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)) {
|
if (IP_IS_V4MAPPEDV6(dst_ip)) {
|
||||||
ip_addr_t dest_ipv4;
|
ip_addr_t dest_ipv4;
|
||||||
unmap_ipv4_mapped_ipv6(ip_2_ip4(&dest_ipv4), ip_2_ip6(dst_ip));
|
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
|
#if LWIP_CHECKSUM_ON_COPY
|
||||||
return udp_sendto_chksum(pcb, p, &dest_ipv4, dst_port, have_chksum, chksum);
|
return udp_sendto_chksum(pcb, p, &dest_ipv4, dst_port, have_chksum, chksum);
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user