public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] sim: mips: fix -Wunused-but-set-variable warnings
@ 2023-12-08 5:32 Michael Frysinger
0 siblings, 0 replies; only message in thread
From: Michael Frysinger @ 2023-12-08 5:32 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5dda1cd28ae9daed39e2f6495df5cfd1e70c6a59
commit 5dda1cd28ae9daed39e2f6495df5cfd1e70c6a59
Author: Mike Frysinger <vapier@gentoo.org>
Date: Wed Dec 6 20:07:56 2023 -0700
sim: mips: fix -Wunused-but-set-variable warnings
Diff:
---
sim/mips/interp.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/sim/mips/interp.c b/sim/mips/interp.c
index f0c509021a4..18ccef8bb38 100644
--- a/sim/mips/interp.c
+++ b/sim/mips/interp.c
@@ -1403,18 +1403,20 @@ sim_monitor (SIM_DESC sd,
if (c == '%')
{
char tmp[40];
+ /* The format logic isn't passed down.
enum {FMT_RJUST, FMT_LJUST, FMT_RJUST0, FMT_CENTER} fmt = FMT_RJUST;
+ */
int width = 0, trunc = 0, haddot = 0, longlong = 0;
while (sim_read (sd, s++, &c, 1) && c != '\0')
{
if (strchr ("dobxXulscefg%", c))
break;
else if (c == '-')
- fmt = FMT_LJUST;
+ /* fmt = FMT_LJUST */;
else if (c == '0')
- fmt = FMT_RJUST0;
+ /* fmt = FMT_RJUST0 */;
else if (c == '~')
- fmt = FMT_CENTER;
+ /* fmt = FMT_CENTER */;
else if (c == '*')
{
if (haddot)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-12-08 5:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-08 5:32 [binutils-gdb] sim: mips: fix -Wunused-but-set-variable warnings Michael Frysinger
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).