qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH for-2.10 4/4] bsd-user/main.c: Fix unused variable w


From: Peter Maydell
Subject: [Qemu-devel] [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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]