aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2025-10-02 15:04:34 +1000
committerStefano Brivio <sbrivio@redhat.com>2025-10-07 15:33:32 +0200
commitee9b2361d04027669bff8df4dc10722bda1c1333 (patch)
treeaea35f37bc692c1f545cdb248f84c2bca2155fbd
parent065d199f9df54b3cbe77a52da5b80d12f2bc7d85 (diff)
downloadpasst-ee9b2361d04027669bff8df4dc10722bda1c1333.tar
passt-ee9b2361d04027669bff8df4dc10722bda1c1333.tar.gz
passt-ee9b2361d04027669bff8df4dc10722bda1c1333.tar.bz2
passt-ee9b2361d04027669bff8df4dc10722bda1c1333.tar.lz
passt-ee9b2361d04027669bff8df4dc10722bda1c1333.tar.xz
passt-ee9b2361d04027669bff8df4dc10722bda1c1333.tar.zst
passt-ee9b2361d04027669bff8df4dc10722bda1c1333.zip
cppcheck: Suppress a buggy cppcheck warning
Another cppcheck package in Fedora, another bogus false positive. This one seems to not realise that a variable has been initialised by getsockopt() under a complicated set of circumstances. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--tcp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tcp.c b/tcp.c
index 48b1ef2..7da4179 100644
--- a/tcp.c
+++ b/tcp.c
@@ -1030,6 +1030,11 @@ int tcp_update_seqack_wnd(const struct ctx *c, struct tcp_tap_conn *conn,
return 0;
}
+ /* This trips a cppcheck bug in some versions, including
+ * cppcheck 2.18.3.
+ * https://sourceforge.net/p/cppcheck/discussion/general/thread/fecde59085/
+ */
+ /* cppcheck-suppress [uninitvar,unmatchedSuppression] */
conn->seq_ack_to_tap = tinfo->tcpi_bytes_acked +
conn->seq_init_from_tap;