From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 85622 invoked by alias); 15 Nov 2016 20:49:23 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 85612 invoked by uid 89); 15 Nov 2016 20:49:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.7 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: smtp.gentoo.org Date: Tue, 15 Nov 2016 20:49:00 -0000 From: Mike Frysinger To: Joseph Myers Cc: libc-alpha@sourceware.org Subject: Re: Fix SH4 register-dump.h for soft-float Message-ID: <20161115204910.GE21655@vapier.lan> Mail-Followup-To: Joseph Myers , libc-alpha@sourceware.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="mYmE2Rtpgr88JNPn" Content-Disposition: inline In-Reply-To: X-SW-Source: 2016-11/txt/msg00514.txt.bz2 --mYmE2Rtpgr88JNPn Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1006 On 07 Nov 2016 23:18, Joseph Myers wrote: > This patch fixes SH4 register-dump.h to declare a variable under the > same conditions on which it is used, to avoid an unused variable error > breaking the build for soft-float. >=20 > Tested (compilation only, in conjunction with other fixes) for SH4 > soft-float. >=20 > 2016-11-07 Joseph Myers >=20 > * sysdeps/unix/sysv/linux/sh/sh4/register-dump.h (register_dump): > Only declare fpregs if [__SH_FPU_ANY__]. >=20 > --- a/sysdeps/unix/sysv/linux/sh/sh4/register-dump.h > +++ b/sysdeps/unix/sysv/linux/sh/sh4/register-dump.h > @@ -56,7 +56,9 @@ static void > register_dump (int fd, struct sigcontext *ctx) > { > char regs[22][8]; > +#ifdef __SH_FPU_ANY__ > char fpregs[34][8]; > +#endif > struct iovec iov[22 * 2 + 34 * 2 + 2]; > size_t nr =3D 0; seems like you could just move it into the existing ifdef scope rather than duplicating the logic ? fpregs is only used inside of an existing if(){...} scope. -mike --mYmE2Rtpgr88JNPn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYK3TGAAoJEEFjO5/oN/WBS54QAMhhcysPyJDHjbd3xeVduNew t/MJL+LWMtkLKa2uxtJm4J1jGp5cVJWtxqeTSROPjO9N7gC5UXSLQ4sATEZjbaQq iWOvHfk3uP3kPTxzGamWqnNkxzsJ4/cKcdWTSjr/vFYxI9vkkcDi+8mWoTGFRsZj rikZLp91mg7DyEyrn8nLDAW/wNRR2gLKfWAZCb5qgnpoDMqGq2rqavpPMVswm8+J n9z6iZKFslL33ZzDaoP9OmeGT1kcWhnkNTas6IJCQRfbD+TqrZQRgOFYgRFZoOU8 zi+wluO4N1mU/lci9ghFiG/M0VCsccr7inzjC0+G5j4DK0uBYUXytrFSgg0He1/U e26ZMW6YKlTK8KUxFeJLdJdZ6qqKL6b0lrX6POc1YelYRQK4ZsUfyUUKXUkY8bY0 yBuht9otnswEYgPAjXJA9GrLZjjt8LKWInSTQBKKor/B5R3iXmuBjR2f9d7fJqMt +v4lcLknh3nH706fpD4Gg9VbeH4xUEEXSCNBAGR/aUXCkPTMxxnsiyOe6oymBbIf zPuuXkzPea7+TQ/K0MrKjg22DL+cpmZXTlK0CFiH+XcP4ujxJeNglRBRpzldIdk8 tf8qAggR2mW81ALiEnvusFxrC1TbcctPgCFREnkQfh72EaOUh4p/Gy58R+Xo3H+h llijHIUhBRYFdN58GlYa =SXcy -----END PGP SIGNATURE----- --mYmE2Rtpgr88JNPn--