From: Laurent Desnogues <laurent.desnogues@gmail.com>
To: Stefan Weil <weil@mail.berlios.de>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
Aurelien Jarno <aurelien@aurel32.net>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH] target-alpha: Fix compiler warning for gcc-4.3 (and older)
Date: Tue, 15 Dec 2009 12:57:27 +0100 [thread overview]
Message-ID: <761ea48b0912150357g5b023aa8s56c06a40ef6c1873@mail.gmail.com> (raw)
In-Reply-To: <1260784489-15773-1-git-send-email-weil@mail.berlios.de>
On Mon, Dec 14, 2009 at 10:54 AM, Stefan Weil <weil@mail.berlios.de> wrote:
> "Old" compilers obviously are not able to recognise
> that all cases are handled here:
>
> qemu/target-alpha/helper.c:70: error: ‘round_mode’ may be used uninitialized in this function
>
> A small modification helps the compiler to do its jobs.
>
> gcc-4.4 does not need this, but is still not standard on all platforms.
>
> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Acked-by: Laurent Desnogues <laurent.desnogues@gmail.com>
> ---
> target-alpha/helper.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/target-alpha/helper.c b/target-alpha/helper.c
> index a658f97..be7d37b 100644
> --- a/target-alpha/helper.c
> +++ b/target-alpha/helper.c
> @@ -95,6 +95,7 @@ void cpu_alpha_store_fpcr (CPUState *env, uint64_t val)
> round_mode = float_round_nearest_even;
> break;
> case 3:
> + default: /* this avoids a gcc (< 4.4) warning */
> round_mode = float_round_up;
> break;
> }
> --
> 1.6.5
>
>
>
>
prev parent reply other threads:[~2009-12-15 11:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-14 9:54 [Qemu-devel] [PATCH] target-alpha: Fix compiler warning for gcc-4.3 (and older) Stefan Weil
2009-12-15 11:57 ` Laurent Desnogues [this message]
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=761ea48b0912150357g5b023aa8s56c06a40ef6c1873@mail.gmail.com \
--to=laurent.desnogues@gmail.com \
--cc=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=weil@mail.berlios.de \
/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 NNTP newsgroup(s).