ui/console: Only declare variable fence_fd when CONFIG_GBM is defined
PATCH 1/1 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 <[email protected]>
Cc Marc-André Lureau <[email protected]>
Signed-off-by Cédric Le Goater <[email protected]>
--- ui/gtk-egl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ui/gtk-egl.c +1 -1
@@ -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 ;
Signature · 1 line
2.45.0
Quoted 20 lines · Cédric Le Goater
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 <[email protected]>Cc Marc-André Lureau <[email protected]>Signed-off-by Cédric Le Goater <[email protected]>--- ui/gtk-egl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)ui/gtk-egl.c +0
-0
ui/gtk-egl.c void gd_egl_draw(VirtualConsole *vc) · line 76
Quoted 10 lines
ui/gtk-egl.c +1
-1@@ -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 ;
Thanks for the quick fix (unfortunately this case isn't covered on CI).
Reviewed-by Philippe Mathieu-Daudé <[email protected]>