[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PATCH for-2.10 4/4] bsd-user/main.c: Fix unused variable
From: |
Peter Maydell |
Subject: |
[Qemu-trivial] [PATCH for-2.10 4/4] bsd-user/main.c: Fix unused variable warning |
Date: |
Tue, 18 Jul 2017 17:26:34 +0100 |
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 <address@hidden>
---
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 fa9c012..501e16f 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.7.4
[Qemu-trivial] [PATCH for-2.10 1/4] bsd-user/mmap.c: Move __thread attribute to right place, Peter Maydell, 2017/07/18
[Qemu-trivial] [PATCH for-2.10 3/4] bsd-user/bsdload.c: Remove write-only id_change variable, Peter Maydell, 2017/07/18