From: Mike Frysinger <vapier@gentoo.org>
To: Joseph Myers <joseph@codesourcery.com>
Cc: libc-alpha@sourceware.org
Subject: Re: Fix SH4 register-dump.h for soft-float
Date: Tue, 15 Nov 2016 20:49:00 -0000 [thread overview]
Message-ID: <20161115204910.GE21655@vapier.lan> (raw)
In-Reply-To: <alpine.DEB.2.20.1611072318330.23588@digraph.polyomino.org.uk>
[-- Attachment #1: Type: text/plain, Size: 1025 bytes --]
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.
>
> Tested (compilation only, in conjunction with other fixes) for SH4
> soft-float.
>
> 2016-11-07 Joseph Myers <joseph@codesourcery.com>
>
> * sysdeps/unix/sysv/linux/sh/sh4/register-dump.h (register_dump):
> Only declare fpregs if [__SH_FPU_ANY__].
>
> --- 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 = 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
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-11-15 20:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-07 23:19 Joseph Myers
2016-11-14 23:38 ` Ping " Joseph Myers
2016-11-15 20:49 ` Mike Frysinger [this message]
2016-11-16 1:40 ` Joseph Myers
2016-11-16 3:16 ` Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161115204910.GE21655@vapier.lan \
--to=vapier@gentoo.org \
--cc=joseph@codesourcery.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).