curses: assert get_wch return value is okay
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 18 Jul 2019 12:01:04 +0000 (14:01 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 21 Aug 2019 09:19:40 +0000 (11:19 +0200)
This prevents the compiler from reporting a possible uninitialized use
of maybe_keycode in function curses_refresh.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1563451264-46176-1-git-send-email-pbonzini@redhat.com

[ kraxel: whitespace fixup ]

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/curses.c

index a6e260eb964d765cc18839027657f88cc14f18eb..ec281125acbdf28230d1808f68f2feaa24892aad 100644 (file)
@@ -225,6 +225,8 @@ static wint_t console_getch(enum maybe_keycode *maybe_keycode)
     case ERR:
         ret = -1;
         break;
+    default:
+        abort();
     }
     return ret;
 }