From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202602 header.b=fFwUf2H7; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 862085A0272 for ; Mon, 11 May 2026 12:03:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202602; t=1778493804; bh=8y0wez89DVNITkWBkIos4w5SkM7ze/5TxUXYHBJfR/E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fFwUf2H7kRDB3mbeY1oA/oYjYdLkIKGdQIRt6Gkg3nKUT8g3ycIupqLgpps7u6AZ1 7qmCWftaIxOx9ALk2rl7VKTknIfzbi6+8ZZQwLLRb6OqQBlYNOKpqiBObCCW/zmUPB u4hLhjA/nnD7fa4GcM+fjMS8yvN5t/omNYtYNc25dl0K5u34+Ph7kdB1r4nH96dFPX DbQ3d1ytQN0qFjFt9fxYyKYfJE2b11C9dZnBjTUEQzSD5FhC/KONW61XwOk+alhTtK /qCatLkJjOPdfGw3htMzDWi5mYe36x62PEeQL2kWIvQUMgj6CofFDSMjL9/+qEgcez mnUUQdrYUcE/w== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4gDZzw1clCz4wJp; Mon, 11 May 2026 20:03:24 +1000 (AEST) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH 5/8] clang-tidy: Suppress sscanf() warning harder Date: Mon, 11 May 2026 20:03:19 +1000 Message-ID: <20260511100322.1016757-6-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260511100322.1016757-1-david@gibson.dropbear.id.au> References: <20260511100322.1016757-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: AK6MOYQID5ONZMGDMYYL2SDXDHL4ZS6Y X-Message-ID-Hash: AK6MOYQID5ONZMGDMYYL2SDXDHL4ZS6Y X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- fwd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fwd.c b/fwd.c index 0697435d..c0a6adac 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; -- 2.54.0