From 7bafe7163ab0bfafc3d90dcba06c1b045b57a285 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Mon, 11 May 2026 20:03:19 +1000 Subject: 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 Reviewed-by: Laurent Vivier Signed-off-by: Stefano Brivio --- fwd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3