This is an automated email from the ASF dual-hosted git repository. GUIDINGLI pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit 880d84278c163e2acc000a7b77abcb484d31d11a Author: Marco Casaroli <[email protected]> AuthorDate: Wed Nov 25 19:31:22 2026 +0100 testing/nettest: Fix the TCP build without CONFIG_NET_SOLINGER. With CONFIG_TESTING_NET_TCP and CONFIG_NET_SOLINGER=n, the helpers tcp_backlog_port() and tcp_close_lo() are not used: only the cases under CONFIG_NET_SOLINGER call them. A build with -Werror stops with "'tcp_backlog_port' defined but not used". Put each helper under the same condition as the cases that use it. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- testing/nettest/tcp/test_tcp_backlog.c | 2 ++ testing/nettest/tcp/test_tcp_close.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/testing/nettest/tcp/test_tcp_backlog.c b/testing/nettest/tcp/test_tcp_backlog.c index 76cdc973b..e11ed1805 100644 --- a/testing/nettest/tcp/test_tcp_backlog.c +++ b/testing/nettest/tcp/test_tcp_backlog.c @@ -231,6 +231,7 @@ static int tcp_backlog_connect(int fd, FAR const struct sockaddr_in *addr, * ****************************************************************************/ +#ifdef CONFIG_NET_SOLINGER static int tcp_backlog_port(int fd, bool peer) { struct sockaddr_in addr; @@ -248,6 +249,7 @@ static int tcp_backlog_port(int fd, bool peer) return ret < 0 ? -1 : ntohs(addr.sin_port); } +#endif /**************************************************************************** * Name: tcp_backlog_try diff --git a/testing/nettest/tcp/test_tcp_close.c b/testing/nettest/tcp/test_tcp_close.c index eb4641fa0..f99d1c77b 100644 --- a/testing/nettest/tcp/test_tcp_close.c +++ b/testing/nettest/tcp/test_tcp_close.c @@ -412,7 +412,7 @@ static void tcp_close_reset(FAR struct tcp_close_state_s *st, int fd) * ****************************************************************************/ -#ifdef CONFIG_NET_LOOPBACK +#if defined(CONFIG_NET_LOOPBACK) && defined(CONFIG_NET_SOLINGER) static void tcp_close_lo(int fd, bool up) { struct ifreq req;
