From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 474F15A026F for ; Thu, 17 Nov 2022 03:08:55 +0100 (CET) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4NCNcx20Qhz4xZG; Thu, 17 Nov 2022 13:08:49 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1668650929; bh=809oZWBrEq+txUsjGbyiEVeDwUizwLG4snlLyMhgvtY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DJRtE1hcCj3Qjgxh2dD3I7hZZUwE8UWm87IsWo9BLKiuIm5gKvk9xAVacbPGgDar4 hSF7leqri19M7WPWIXdWWkH2o8p1wvzfJgNuyd7m1vAb69upPTJxol1Knop/JKcmqM 3JO3jdssmfqPXMjPMZE512B4XjZUFAbAmES0eX74= Date: Thu, 17 Nov 2022 12:20:03 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH 01/32] clang-tidy: Suppress warning about assignments in if statements Message-ID: References: <20221116044212.3876516-1-david@gibson.dropbear.id.au> <20221116044212.3876516-2-david@gibson.dropbear.id.au> <20221117001048.4b672b6b@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="mJNROWDGW8SqMYoI" Content-Disposition: inline In-Reply-To: <20221117001048.4b672b6b@elisabeth> Message-ID-Hash: TOW65A6WMDJ322D6CKH4W5MXGNACMO2I X-Message-ID-Hash: TOW65A6WMDJ322D6CKH4W5MXGNACMO2I 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.3 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: --mJNROWDGW8SqMYoI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 17, 2022 at 12:10:48AM +0100, Stefano Brivio wrote: > On Wed, 16 Nov 2022 15:41:41 +1100 > David Gibson wrote: >=20 > > clang-tools 15.0.0 appears to have added a new warning that will always > > complain about assignments in if statements, which we use in a number of > > places in passt/pasta. Encountered on Fedora 37 with > > clang-tools-extra-15.0.0-3.fc37.x86_64. > >=20 > > Suppress the new warning so that we can compile and test. > >=20 > > Signed-off-by: David Gibson > > --- > > Makefile | 1 + > > 1 file changed, 1 insertion(+) > >=20 > > diff --git a/Makefile b/Makefile > > index 6b22408..8bcbbc0 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -262,6 +262,7 @@ clang-tidy: $(SRCS) $(HEADERS) > > clang-tidy -checks=3D*,-modernize-*,\ > > -clang-analyzer-valist.Uninitialized,\ > > -cppcoreguidelines-init-variables,\ > > + -bugprone-assignment-in-if-condition,\ >=20 > I'm trying to keep, in the comment just above, a list of clang-tidy > warnings we disable and the reason. I think this could just be grouped > with: Good point, I've updated the comment. >=20 > # - cppcoreguidelines-init-variables > # Dubious value, would kill readability >=20 --=20 David Gibson | 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 --mJNROWDGW8SqMYoI Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoULxWu4/Ws0dB+XtgypY4gEwYSIFAmN1jCkACgkQgypY4gEw YSKmSA//cvODDhR2/7pzTyO1mev+24sWUb6FS2v6mtNzKBQ1QN9dIR8UnOAG917j SMcfJrbutZwwMWC76c5bkq5TLrfnk3Re/X43LBvkCMJVcLgy/Rn8N1wMEIr2HPjX l4pJ4SDUaMq4/9eZQVfCp8cJTosW7gRML4kZVzvEPYl80TYekbqGhSClRT3ynJfW sqA0o3fBKYsMKnbt5d/K0zlbO/NRBSV698pehzTLBkeKu+xXbtgJSYrtpbhOngtD p9ir3gK5skU1odVYThvClvnOlAbHgdqBjTM0lXvhmLvZAmgLxKUYDMe2n5zHEO9x JxKy+47qdwhC4u1CxOW0RnvRnAK1y5Mtxr05UmMdc9VJiQQxSJB4wPBvdX/RzKKN Z1bpw0U34Tk7Y7Vq78nnYrZIhbVU0GWV+2wknZ02O5C+HuSEbDfMD9zuDaPpayvK yN+ZadabTyTeGeh/Ii4WyUbgONLuW/6Fztkmz+3d2nKVEco/r3/836OCE8QcqnGU FV106iCmYw9d7B1j/H+F31OGFqb0Yd7yDcwnkImruD1FLMjOglA4GZAQ+ciP027v CDzvzOouIOrs7xN0DHNsD1Yn9lJ4Y08ryWisEhDKUcLQv/EvEUw0QgXde3lwKpk9 flwcRoDTS5+lFuL7tk94ATcnu7XK4DGigA+RpaPvNQDLWfJo4z0= =uU76 -----END PGP SIGNATURE----- --mJNROWDGW8SqMYoI--