aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2026-05-11 20:03:19 +1000
committerStefano Brivio <sbrivio@redhat.com>2026-05-12 00:04:05 +0200
commit7bafe7163ab0bfafc3d90dcba06c1b045b57a285 (patch)
tree3504232b83524d06d71df6ae73488bf2f72c196b
parenta82a2173d4ea41fe4e97d9451f8ed1626b00d612 (diff)
downloadpasst-7bafe7163ab0bfafc3d90dcba06c1b045b57a285.tar
passt-7bafe7163ab0bfafc3d90dcba06c1b045b57a285.tar.gz
passt-7bafe7163ab0bfafc3d90dcba06c1b045b57a285.tar.bz2
passt-7bafe7163ab0bfafc3d90dcba06c1b045b57a285.tar.lz
passt-7bafe7163ab0bfafc3d90dcba06c1b045b57a285.tar.xz
passt-7bafe7163ab0bfafc3d90dcba06c1b045b57a285.tar.zst
passt-7bafe7163ab0bfafc3d90dcba06c1b045b57a285.zip
clang-tidy: Suppress sscanf() warning harder
We already have a clang-tidy suppression to stop if complaining about our use of sscanf() in procfs_scan_listen(). However, it now (clang-tidy 22.1.4 or thereabouts) seems there's an additional warning category that complains about the same thing. Add that to the suppression. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--fwd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fwd.c b/fwd.c
index 0697435..c0a6ada 100644
--- a/fwd.c
+++ b/fwd.c
@@ -599,7 +599,8 @@ static void procfs_scan_listen(int fd, unsigned int lstate, uint8_t *map)
lineread_init(&lr, fd);
lineread_get(&lr, &line); /* throw away header */
while (lineread_get(&lr, &line) > 0) {
- /* NOLINTNEXTLINE(cert-err34-c): != 2 if conversion fails */
+ /* != 2 if conversion fails */
+ /* NOLINTNEXTLINE(bugprone-unchecked-string-to-number-conversion,cert-err34-c) */
if (sscanf(line, "%*u: %*x:%lx %*x:%*x %x", &port, &state) != 2)
continue;