From 7256320b9531e8af14ef75a42c09c47161be1480 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 6 Nov 2021 12:52:00 -0400 Subject: 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. --- sim/sh/gencode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sim/sh') 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 @", "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 @", "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 @", "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 */", }, -- cgit v1.1