tcp: fix compiling with LWIP_NOASSERT

See bug #64734
This commit is contained in:
Simon Goldschmidt 2023-10-03 17:31:19 +02:00
parent de6b0a35f8
commit ae5a5b99eb
2 changed files with 4 additions and 0 deletions

View File

@ -141,6 +141,7 @@ tftp_example_init_client(void)
ip_addr_t srv; ip_addr_t srv;
int ret = ipaddr_aton(LWIP_TFTP_EXAMPLE_CLIENT_REMOTEIP, &srv); int ret = ipaddr_aton(LWIP_TFTP_EXAMPLE_CLIENT_REMOTEIP, &srv);
LWIP_ASSERT("ipaddr_aton failed", ret == 1); LWIP_ASSERT("ipaddr_aton failed", ret == 1);
LWIP_UNUSED_ARG(ret);
err = tftp_init_client(&tftp); err = tftp_init_client(&tftp);
LWIP_ASSERT("tftp_init_client failed", err == ERR_OK); LWIP_ASSERT("tftp_init_client failed", err == ERR_OK);

View File

@ -1987,6 +1987,9 @@ tcp_rst_common(const struct tcp_pcb *pcb, u32_t seqno, u32_t ackno,
LWIP_ASSERT("tcp_rst: invalid local_ip", local_ip != NULL); LWIP_ASSERT("tcp_rst: invalid local_ip", local_ip != NULL);
LWIP_ASSERT("tcp_rst: invalid remote_ip", remote_ip != NULL); LWIP_ASSERT("tcp_rst: invalid remote_ip", remote_ip != NULL);
/* these two are passed only for checks, disable warnings without asserts */
LWIP_UNUSED_ARG(local_ip);
LWIP_UNUSED_ARG(remote_ip);
optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb); optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb);