From ae5a5b99eb29b9dd4a5f6fe4f6a717a3178c1141 Mon Sep 17 00:00:00 2001 From: Simon Goldschmidt Date: Tue, 3 Oct 2023 17:31:19 +0200 Subject: [PATCH] tcp: fix compiling with LWIP_NOASSERT See bug #64734 --- contrib/examples/tftp/tftp_example.c | 1 + src/core/tcp_out.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/contrib/examples/tftp/tftp_example.c b/contrib/examples/tftp/tftp_example.c index 3e140146..f6a28b4f 100644 --- a/contrib/examples/tftp/tftp_example.c +++ b/contrib/examples/tftp/tftp_example.c @@ -141,6 +141,7 @@ tftp_example_init_client(void) ip_addr_t srv; int ret = ipaddr_aton(LWIP_TFTP_EXAMPLE_CLIENT_REMOTEIP, &srv); LWIP_ASSERT("ipaddr_aton failed", ret == 1); + LWIP_UNUSED_ARG(ret); err = tftp_init_client(&tftp); LWIP_ASSERT("tftp_init_client failed", err == ERR_OK); diff --git a/src/core/tcp_out.c b/src/core/tcp_out.c index 64579ee5..fee3f5ad 100644 --- a/src/core/tcp_out.c +++ b/src/core/tcp_out.c @@ -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 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);