From: Cédric Le Goater Date: Wed, 15 May 2024 10:05:20 +0000 (+0200) Subject: ui/console: Only declare variable fence_fd when CONFIG_GBM is defined X-Git-Tag: v9.1.0-rc0~102^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3dba3c0b2501e6afa9f722608be6a343465895da;p=thirdparty%2Fqemu.git ui/console: Only declare variable fence_fd when CONFIG_GBM is defined This to avoid a build breakage : ../ui/gtk-egl.c: In function ‘gd_egl_draw’: ../ui/gtk-egl.c:73:9: error: unused variable ‘fence_fd’ [-Werror=unused-variable] 73 | int fence_fd; | ^~~~~~~~ Fixes: fa6426805b12 ("ui/console: Use qemu_dmabuf_set_..() helpers instead") Cc: Dongwon Kim Cc: Marc-André Lureau Signed-off-by: Cédric Le Goater Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240515100520.574383-1-clg@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index 0473f689c91..9831c10e1bd 100644 --- a/ui/gtk-egl.c +++ b/ui/gtk-egl.c @@ -68,9 +68,9 @@ void gd_egl_draw(VirtualConsole *vc) GdkWindow *window; #ifdef CONFIG_GBM QemuDmaBuf *dmabuf = vc->gfx.guest_fb.dmabuf; + int fence_fd; #endif int ww, wh, ws; - int fence_fd; if (!vc->gfx.gls) { return;