From e4335180d2b40de8a5027030edbcd89aa6557bbc Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Tue, 18 Jul 2017 17:26:34 +0100 Subject: [PATCH] bsd-user/main.c: Fix unused variable warning On OpenBSD the compiler warns: bsd-user/main.c:622:21: warning: variable 'sig' set but not used [-Wunused-but-set-variable] This is because a lot of the signal delivery code is #if-0'd out as unused. Reshuffle #ifdefs a bit to silence the warning. (We make the minimum change here rather than removing all the bsd-user patchset which should make this all work correctly and there's no point giving them an awkward rebase task.) Signed-off-by: Peter Maydell Reviewed-by: Thomas Huth Reviewed-by: Eric Blake Message-id: 1500395194-21455-5-git-send-email-peter.maydell@linaro.org --- bsd-user/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bsd-user/main.c b/bsd-user/main.c index fa9c012c9f..501e16f675 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -619,9 +619,10 @@ void cpu_loop(CPUSPARCState *env) break; case EXCP_DEBUG: { - int sig; - - sig = gdb_handlesig(cs, TARGET_SIGTRAP); +#if 0 + int sig = +#endif + gdb_handlesig(cs, TARGET_SIGTRAP); #if 0 if (sig) { -- 2.11.0