From 1d454c3fee00d9d1e46e1ec6788d49da5a0bfdb0 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 3 Oct 2018 14:11:38 +0200 Subject: [PATCH] gtk: fix uninitialized variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit zoom_to_fit is never initialized to false, Coverity complains (not sure why GCC does not). Fixes: e8b1386ea1719525a1a92df03377764703fe8c64 Cc: kraxel@redhat.com Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Message-id: 20181003121138.22037-1-pbonzini@redhat.com Signed-off-by: Gerd Hoffmann --- ui/gtk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/gtk.c b/ui/gtk.c index 1d68276253..c4dd17a6fa 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -2138,7 +2138,7 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, VirtualConsole *vc, QemuConsole *con, int idx, GSList *group, GtkWidget *view_menu) { - bool zoom_to_fit; + bool zoom_to_fit = false; vc->label = qemu_console_get_label(con); vc->s = s;