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=202410 header.b=KIB2BBVt; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 7F40E5A061D for ; Fri, 08 Nov 2024 03:24:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202410; t=1731032623; bh=w2UsfdOgAEP4CS2qiqFF75oo29cjZf4+mapoRU7nAAI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KIB2BBVtZxbMGiUJXqJVtyHZfIbvqfR3XgpgGKmSExAeBKLp0U4sYTCeVxcaehA0y B4dukE61VycdguqLxRrfp+t4QT61lCsA9+JLf4kOOB0dVuFV2gd9el29nYGb/BtueP abEMiwlXIhYmrkugUDHMs69t4UTvvaLxM7PV9SKmSlt1I8dCS8fJj/Y70ANsmNNW78 yH9vFrRmjPYhazRP2kNhATcszHVFBveeMdnykSA5sVXBDvO7sxXP83qZsSFlvs8Ob6 dLOZdrxrMZrDfMtTNasTcXos5pu4yQtvXDw8Zw7rhHwtpapgDLh6CJ8kCCEGw1r3tj UHPnIZMoVfmdA== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Xl2mv2Stqz4x89; Fri, 8 Nov 2024 13:23:43 +1100 (AEDT) Date: Fri, 8 Nov 2024 11:30:55 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH 5/6] passt: Use NOLINT clang-tidy block instead of NOLINTNEXTLINE Message-ID: References: <20241107184331.3164784-1-sbrivio@redhat.com> <20241107184331.3164784-6-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="+Atz1yXzK+Yhw3u5" Content-Disposition: inline In-Reply-To: <20241107184331.3164784-6-sbrivio@redhat.com> Message-ID-Hash: 45IUCJQ5JEMVT6K7Q3L3ZDNUKFOA4QM6 X-Message-ID-Hash: 45IUCJQ5JEMVT6K7Q3L3ZDNUKFOA4QM6 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: passt-dev@passt.top 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: --+Atz1yXzK+Yhw3u5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 07, 2024 at 07:43:30PM +0100, Stefano Brivio wrote: > For some reason, this is only reported by clang-tidy 19.1.2 on > Alpine: >=20 > /home/sbrivio/passt/passt.c:314:53: error: conditional operator with iden= tical true and false expressions [bugprone-branch-clone,-warnings-as-errors] > 314 | nfds =3D epoll_wait(c.epollfd, events, EPOLL_EVENTS, TIME= R_INTERVAL); > | ^ >=20 > We do have a suppression, but not on the line preceding it, because > we also need a cppcheck suppression there. Use NOLINTBEGIN/NOLINTEND > for the clang-tidy suppression. >=20 > Signed-off-by: Stefano Brivio Reviewed-by: David Gibson > --- > passt.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/passt.c b/passt.c > index eaf231d..fac6101 100644 > --- a/passt.c > +++ b/passt.c > @@ -309,9 +309,10 @@ int main(int argc, char **argv) > timer_init(&c, &now); > =20 > loop: > - /* NOLINTNEXTLINE(bugprone-branch-clone): intervals can be the same */ > + /* NOLINTBEGIN(bugprone-branch-clone): intervals can be the same */ > /* cppcheck-suppress [duplicateValueTernary, unmatchedSuppression] */ > nfds =3D epoll_wait(c.epollfd, events, EPOLL_EVENTS, TIMER_INTERVAL); > + /* NOLINTEND(bugprone-branch-clone) */ > if (nfds =3D=3D -1 && errno !=3D EINTR) > die_perror("epoll_wait() failed in main loop"); > =20 --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --+Atz1yXzK+Yhw3u5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmctW74ACgkQzQJF27ox 2GfdJRAAkqgj9QIZraJ87XEgwTGBBvuCX6NUdeeezdGv6JYKWp6mg47xAijRVzLy 5snmiUw8+yDJZWzefubvX7GOK/DzXntchcGZuYBFdzEbMR5GPCU2IM2rNXzR8MaT /fTkxKIFGvTxFoyfP4X/gbKRt48+WNh/T+KbE1UuDQ/9Q1rYkXJcbD2K9QW4Lwvp L8TyEZDNksYEtNQtKcOOXLAIF5/rIkf93PNjaiYCfu48jU6OlIpRDOCt0eMQrC4u j9gr0n5RwFxhpb4je/XpZ6ZXZn6SQPfT7a2zW37z0nFeITzq1n5Q/iutzrqJyfOt pylyGfoZPXMhMvQBbh9thQkCyCmjAtajN3RKFLMG4K5JVnJFvqnO5JE9Jln2l75S bsOti422+c1YEjbPDK88WcNcYNZK/oqOLpwqZyTvvhJsfui6AdcApFn2La89uAzR jklhrFkuiU5hN7FZ+LnUNNJTbf1sa3oJSU3TVGnJnivwTEELn6WMnZF92bsXGZsT C54C8GarccfC4Ru2ANWDKkacIt6PXh828/ZtTVA6jWrOlSGU3S00duKiNkzdNfMo SCLoPlEeDZRZbrE2MoBV1djzX1TGkJXM/N/Zvo87zEHtYoaCmxAMX3GotW6/ppMR DwOKPzHiESt15A9jiNu3zCs2blyT4G0hdk8lscT2w78bG4BwhG4= =jXPX -----END PGP SIGNATURE----- --+Atz1yXzK+Yhw3u5--