From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ScBJD0dqVWNExg8AWB0awg (envelope-from ) for ; Sun, 23 Oct 2022 12:22:31 -0400 Received: by simark.ca (Postfix, from userid 112) id 371591E112; Sun, 23 Oct 2022 12:22:31 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=ICE5bapq; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id DAFE31E0D5 for ; Sun, 23 Oct 2022 12:22:30 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3DC443858299 for ; Sun, 23 Oct 2022 16:22:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3DC443858299 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666542150; bh=HyU8fGV6OK7Yudex61Mg+sT4V9WKKNxRXjo4AtjHWVI=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=ICE5bapqLmO2xr1Pvi1zoZLk0cT3rH0XcxI1kmKu0sPZ4FZxtAX3NptKNGS59upkV IiQ1Ql8ynTMqm1vVtFnTAYbCtYTSzdlEBzux1wRHVUbuYv/3rzfO2dM+1vt4gPxwq0 0SH4zXardBkJseMBUb/8Vy4VOJ4KGo121pXY3LJ0= 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 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 To: Tsukasa OI 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-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Cc: Nick Clifton , gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" --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--