qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PULL 1/2] curses: assert get_wch return value is okay


From: Gerd Hoffmann
Subject: [Qemu-devel] [PULL 1/2] curses: assert get_wch return value is okay
Date: Thu, 22 Aug 2019 06:42:17 +0200

From: Paolo Bonzini <address@hidden>

This prevents the compiler from reporting a possible uninitialized use
of maybe_keycode in function curses_refresh.

Cc: Gerd Hoffmann <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Message-id: address@hidden

[ kraxel: whitespace fixup ]

Signed-off-by: Gerd Hoffmann <address@hidden>
---
 ui/curses.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ui/curses.c b/ui/curses.c
index a6e260eb964d..ec281125acbd 100644
--- a/ui/curses.c
+++ b/ui/curses.c
@@ -225,6 +225,8 @@ static wint_t console_getch(enum maybe_keycode 
*maybe_keycode)
     case ERR:
         ret = -1;
         break;
+    default:
+        abort();
     }
     return ret;
 }
-- 
2.18.1




reply via email to

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