aboutsummaryrefslogtreecommitdiff
path: root/sim/mips
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2023-12-06 20:07:56 -0700
committerMike Frysinger <vapier@gentoo.org>2023-12-07 21:41:27 -0700
commit5dda1cd28ae9daed39e2f6495df5cfd1e70c6a59 (patch)
tree7ad95bd7dbf63d3a8186403b165f20342f9007db /sim/mips
parent2a04b8c9085b3d1d198711ae08e5414843f1a9be (diff)
downloadgdb-5dda1cd28ae9daed39e2f6495df5cfd1e70c6a59.zip
gdb-5dda1cd28ae9daed39e2f6495df5cfd1e70c6a59.tar.gz
gdb-5dda1cd28ae9daed39e2f6495df5cfd1e70c6a59.tar.bz2
sim: mips: fix -Wunused-but-set-variable warnings
Diffstat (limited to 'sim/mips')
-rw-r--r--sim/mips/interp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sim/mips/interp.c b/sim/mips/interp.c
index f0c5090..18ccef8 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)