public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH] tcp: Suppress false positive cppcheck warning in tcp_update_seqack_wnd()
@ 2025-12-09 13:49 Laurent Vivier
  2025-12-09 22:55 ` David Gibson
  0 siblings, 1 reply; 2+ messages in thread
From: Laurent Vivier @ 2025-12-09 13:49 UTC (permalink / raw)
  To: passt-dev; +Cc: Laurent Vivier

Cppcheck doesn't track that tinfo is reassigned to &tinfo_new when NULL,
leading to a false uninitvar warning at line 1099. Add inline suppression.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
---
 tcp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tcp.c b/tcp.c
index 17fda5dcd7db..8dabfd3042d2 100644
--- a/tcp.c
+++ b/tcp.c
@@ -1132,6 +1132,7 @@ int tcp_update_seqack_wnd(const struct ctx *c, struct tcp_tap_conn *conn,
 				return 0;
 		}
 
+		/* cppcheck-suppress uninitvar */
 		if ((unsigned)SNDBUF_GET(conn) > (long long)tinfo->tcpi_rtt *
 						 tinfo->tcpi_delivery_rate /
 						 1000 / 1000 *
-- 
2.51.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-12-09 22:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-09 13:49 [PATCH] tcp: Suppress false positive cppcheck warning in tcp_update_seqack_wnd() Laurent Vivier
2025-12-09 22:55 ` David Gibson

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).