* [PATCH] ui/console: Only declare variable fence_fd when CONFIG_GBM is defined
@ 2024-05-15 10:05 Cédric Le Goater
2024-05-15 10:09 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 2+ messages in thread
From: Cédric Le Goater @ 2024-05-15 10:05 UTC (permalink / raw)
To: qemu-devel
Cc: Gerd Hoffmann, Cédric Le Goater, Dongwon Kim,
Marc-André Lureau
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 <dongwon.kim@intel.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
---
ui/gtk-egl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
index 0473f689c915f8b2303cd9d11bc7d8336c2a85ba..9831c10e1bd58f76d8f803ad0a72d983adc3f490 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;
--
2.45.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ui/console: Only declare variable fence_fd when CONFIG_GBM is defined
2024-05-15 10:05 [PATCH] ui/console: Only declare variable fence_fd when CONFIG_GBM is defined Cédric Le Goater
@ 2024-05-15 10:09 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-05-15 10:09 UTC (permalink / raw)
To: Cédric Le Goater, qemu-devel, Richard Henderson
Cc: Gerd Hoffmann, Dongwon Kim, Marc-André Lureau
On 15/5/24 12:05, Cédric Le Goater wrote:
> 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 <dongwon.kim@intel.com>
> Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
> Signed-off-by: Cédric Le Goater <clg@redhat.com>
> ---
> ui/gtk-egl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
> index 0473f689c915f8b2303cd9d11bc7d8336c2a85ba..9831c10e1bd58f76d8f803ad0a72d983adc3f490 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;
Thanks for the quick fix (unfortunately this case isn't
covered on CI).
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-15 10:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-15 10:05 [PATCH] ui/console: Only declare variable fence_fd when CONFIG_GBM is defined Cédric Le Goater
2024-05-15 10:09 ` Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).