From f107bde1e2e8c67eb42d0a5c757c0a1c777b0327 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Wed, 31 Jul 2019 11:14:37 +0200 Subject: [PATCH] xwayland: Fix build warning without glamor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Building Xwayland without glamor support would raise a warning at build time: xwayland.c: In function ‘xwl_screen_init’: xwayland.c:980:10: warning: unused variable ‘use_eglstreams’ 980 | Bool use_eglstreams = FALSE; | ^~~~~~~~~~~~~~ When building without glamor support, we cannot have EGL Streams support either, the two being related. So we do not need to declare the variable `use_eglstreams` if glamor is not enabled. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer --- hw/xwayland/xwayland.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c index fe8b1abdc..2475366e0 100644 --- a/hw/xwayland/xwayland.c +++ b/hw/xwayland/xwayland.c @@ -977,7 +977,9 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv) struct xwl_screen *xwl_screen; Pixel red_mask, blue_mask, green_mask; int ret, bpc, green_bpc, i; +#ifdef XWL_HAS_GLAMOR Bool use_eglstreams = FALSE; +#endif xwl_screen = calloc(1, sizeof *xwl_screen); if (xwl_screen == NULL)