aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-07-20 17:11:49 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-07-20 17:11:49 +0100
commita235ea962d113b71244f457aef7a596929b9307b (patch)
tree804e236094a43845b9e7068a8ea00f75b6a392cb
parent267d5d681da28674aee7c7e5abb26d8f321d847f (diff)
downloadqemu-arm-a235ea962d113b71244f457aef7a596929b9307b.tar.gz
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. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--bsd-user/main.c7
1 files 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)
{