public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] riscv: Add 'break' statements to fpsetround switch
Date: Tue, 21 Jan 2020 09:28:00 -0000 [thread overview]
Message-ID: <20200121092850.72506.qmail@sourceware.org> (raw)
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=8e74c7119fb7f95662bb4986570a98496f259400
commit 8e74c7119fb7f95662bb4986570a98496f259400
Author: Keith Packard <keithp@keithp.com>
Date: Mon Jan 20 22:46:35 2020 -0800
riscv: Add 'break' statements to fpsetround switch
This makes the fpsetround function actually do something rather than
just return -1 due to the default 'fall-through' behavior of the switch
statement.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diff:
---
newlib/libc/machine/riscv/ieeefp.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/newlib/libc/machine/riscv/ieeefp.c b/newlib/libc/machine/riscv/ieeefp.c
index 68ace0b..c458322 100644
--- a/newlib/libc/machine/riscv/ieeefp.c
+++ b/newlib/libc/machine/riscv/ieeefp.c
@@ -84,10 +84,10 @@ fpsetround(fp_rnd rnd_dir)
unsigned new_rm;
switch (rnd_dir)
{
- case FP_RN: new_rm = 0;
- case FP_RZ: new_rm = 1;
- case FP_RM: new_rm = 2;
- case FP_RP: new_rm = 3;
+ case FP_RN: new_rm = 0; break;
+ case FP_RZ: new_rm = 1; break;
+ case FP_RM: new_rm = 2; break;
+ case FP_RP: new_rm = 3; break;
default: return -1;
}
fssr (new_rm << 5 | fsr & 0x1f);
reply other threads:[~2020-01-21 9:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200121092850.72506.qmail@sourceware.org \
--to=corinna@sourceware.org \
--cc=newlib-cvs@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).