From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id EDDD23858280 for ; Sun, 23 Oct 2022 16:22:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EDDD23858280 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 84ADE34118E; Sun, 23 Oct 2022 16:22:10 +0000 (UTC) Date: Sun, 23 Oct 2022 20:52:44 +0545 From: Mike Frysinger To: Tsukasa OI Cc: Andrew Burgess , Nick Clifton , gdb-patches@sourceware.org Subject: Re: [PATCH 29/40] sim/ppc: Fix indentation on generated code Message-ID: Mail-Followup-To: Tsukasa OI , Andrew Burgess , Nick Clifton , gdb-patches@sourceware.org References: <04f72f880579950f6196da72073a3698582fda0b.1666258361.git.research_trasio@irq.a4lg.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="f9zXBk4qCCLgrxoO" Content-Disposition: inline In-Reply-To: <04f72f880579950f6196da72073a3698582fda0b.1666258361.git.research_trasio@irq.a4lg.com> X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00,GIT_PATCH_0,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --f9zXBk4qCCLgrxoO Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 20 Oct 2022 09:32, Tsukasa OI wrote: > Clang generates a warning if there is a block statement and another > adjacent statement with a misleading indent ("-Wmisleading-indentation"). > On the default configuration, it causes a build failure > (unless "--disable-werror" is specified). >=20 > The cause of this warning, $(builddir)/sim/ppc/semantics.c is generated by > $(srcdir)/sim/ppc/igen.c and this commit fixes generating misleading > indentation by removing two spaces. > --- > sim/ppc/igen.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/sim/ppc/igen.c b/sim/ppc/igen.c > index 27b48638276..786ea540d57 100644 > --- a/sim/ppc/igen.c > +++ b/sim/ppc/igen.c > @@ -233,7 +233,7 @@ gen_semantics_c(insn_table *table, > lf_printf(file, " option_mpc860c0 =3D 0;\n"); > lf_printf(file, " if (tree_find_property(root, \"/options/mpc860c0\= "))\n"); > lf_printf(file, " option_mpc860c0 =3D tree_find_integer_property(= root, \"/options/mpc860c0\");\n"); > - lf_printf(file, " option_mpc860c0 *=3D 4; /* convert word count= to byte count */\n"); > + lf_printf(file, " option_mpc860c0 *=3D 4; /* convert word count t= o byte count */\n"); this maintains existing behavior, and logically it's the same, but i think = we should fix the intention of the code -- add braces so that the *4 only happ= ens inside the if statement. -mike --f9zXBk4qCCLgrxoO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmNVWMAACgkQQWM7n+g3 9YFtkRAAlys6/TuD1guo2W75Jb/W8e+sbFSPOYDz26z/HeGsq08wZ4VVLQpXqT/6 YFnglkCcSfiv8ypYmbvELQbjXghAdg7PNoLxk1U1d698OGrJ48Soa236eNm3EIUB LNonROix/8VfwAX02N6tRqBDHhtHE4Z/t5IgBKYw0ibu/u18KDnpnssX5YE6jIL7 aI0x+VW91J8LuxJEqY84mBaOGtI/O0jEn4kGpo7/U4p5+S6Z0hQmvvllWs0ctzU8 NT4jRE0XX63/ur/niOJIXXbxrJfDnZXPprbY/ofCS6dVlDVAWNdESaUloKbhzEhJ yAbR+XOSc98ZbpItlKttyBYwuSqWfDj1WrKUBoHs/QWtgw5hr0W8hOQxUZ9PIDNH 9XMvQFVXLGJEY1hAXRO2lOn6WJmHPMnluk8CHmZ89b9VqeXCX8X68x10g5Ti+0qc abWwStWk5/Hi6RBntSWeXMNxfZafrEgNvzMiBSnZupdSUy2G5Hhyzi6PCLQiovgB UT8DXoniOtXJrw/9EkfmMPugaqi3uPZL7iew4BdbT0grGqblSoS3O8/CapynXrR3 2hBsQ/WUtoO1d0mjAxBVj3JsCfmmvBUMvYtrVuZopC5p5PeltQa4/Neztzl5oi/n 5zYaIVmrw3HmRUv2/BMC+RbyH5ekye3HawjwZXbMpg0NprV+CNc= =TGnp -----END PGP SIGNATURE----- --f9zXBk4qCCLgrxoO--