aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-11-06 12:52:00 -0400
committerMike Frysinger <vapier@gentoo.org>2021-11-06 20:32:31 -0400
commit7256320b9531e8af14ef75a42c09c47161be1480 (patch)
treed9efca793b454e67087dfcb6bb9c350da63b10c8
parent74bbe64132d675b9a5c459f4140c6c566c7ca1bf (diff)
downloadgdb-7256320b9531e8af14ef75a42c09c47161be1480.zip
gdb-7256320b9531e8af14ef75a42c09c47161be1480.tar.gz
gdb-7256320b9531e8af14ef75a42c09c47161be1480.tar.bz2
sim: sh: fix unused-value warnings
These macro expansions are deliberate in not using the computed value so that they trigger side-effects (possible invalid memory accesses) but while otherwise being noops. Add a (void) cast so the compiler knows these are intentional.
-rw-r--r--sim/sh/gencode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sim/sh/gencode.c b/sim/sh/gencode.c
index c922cfe..ae44bc8 100644
--- a/sim/sh/gencode.c
+++ b/sim/sh/gencode.c
@@ -1239,17 +1239,17 @@ static op tab[] =
},
{ "", "n", "ocbi @<REG_N>", "0000nnnn10010011",
- "RSBAT (R[n]); /* Take exceptions like byte load, otherwise noop. */",
+ "(void) RSBAT (R[n]); /* Take exceptions like byte load, otherwise noop. */",
"/* FIXME: Cache not implemented */",
},
{ "", "n", "ocbp @<REG_N>", "0000nnnn10100011",
- "RSBAT (R[n]); /* Take exceptions like byte load, otherwise noop. */",
+ "(void) RSBAT (R[n]); /* Take exceptions like byte load, otherwise noop. */",
"/* FIXME: Cache not implemented */",
},
{ "", "n", "ocbwb @<REG_N>", "0000nnnn10110011",
- "RSBAT (R[n]); /* Take exceptions like byte load, otherwise noop. */",
+ "(void) RSBAT (R[n]); /* Take exceptions like byte load, otherwise noop. */",
"/* FIXME: Cache not implemented */",
},