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.
This commit is contained in:
Mike Frysinger
2021-11-06 12:52:00 -04:00
parent 74bbe64132
commit 7256320b95

View File

@ -1239,17 +1239,17 @@ static op tab[] =
}, },
{ "", "n", "ocbi @<REG_N>", "0000nnnn10010011", { "", "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 */", "/* FIXME: Cache not implemented */",
}, },
{ "", "n", "ocbp @<REG_N>", "0000nnnn10100011", { "", "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 */", "/* FIXME: Cache not implemented */",
}, },
{ "", "n", "ocbwb @<REG_N>", "0000nnnn10110011", { "", "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 */", "/* FIXME: Cache not implemented */",
}, },