From: Stefan Weil <weil@mail.berlios.de>
To: Richard Henderson <rth@twiddle.net>,
Aurelien Jarno <aurelien@aurel32.net>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] target-alpha: Fix compiler warning for gcc-4.3 (and older)
Date: Mon, 14 Dec 2009 10:54:49 +0100 [thread overview]
Message-ID: <1260784489-15773-1-git-send-email-weil@mail.berlios.de> (raw)
"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>
---
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
next reply other threads:[~2009-12-14 9:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-14 9:54 Stefan Weil [this message]
2009-12-15 11:57 ` [Qemu-devel] [PATCH] target-alpha: Fix compiler warning for gcc-4.3 (and older) Laurent Desnogues
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=1260784489-15773-1-git-send-email-weil@mail.berlios.de \
--to=weil@mail.berlios.de \
--cc=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).