From 68097ed5e5bd5bc5bfead8076dbef700a8537b15 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 18 Jul 2019 14:01:04 +0200 Subject: curses: assert get_wch return value is okay This prevents the compiler from reporting a possible uninitialized use of maybe_keycode in function curses_refresh. Cc: Gerd Hoffmann Signed-off-by: Paolo Bonzini Message-id: 1563451264-46176-1-git-send-email-pbonzini@redhat.com [ kraxel: whitespace fixup ] Signed-off-by: Gerd Hoffmann --- ui/curses.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ui/curses.c') diff --git a/ui/curses.c b/ui/curses.c index a6e260eb96..ec281125ac 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; } -- cgit v1.2.3