public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Laurent Vivier <lvivier@redhat.com>
To: passt-dev@passt.top
Cc: Laurent Vivier <lvivier@redhat.com>
Subject: [PATCH] tcp: Suppress false positive cppcheck warning in tcp_update_seqack_wnd()
Date: Tue,  9 Dec 2025 14:49:04 +0100	[thread overview]
Message-ID: <20251209134904.3237912-1-lvivier@redhat.com> (raw)

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


             reply	other threads:[~2025-12-09 13:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-09 13:49 Laurent Vivier [this message]
2025-12-09 22:55 ` David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251209134904.3237912-1-lvivier@redhat.com \
    --to=lvivier@redhat.com \
    --cc=passt-dev@passt.top \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).