summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>2016-11-24 11:54:44 +0200
committerAdam Jackson <ajax@redhat.com>2017-02-23 13:30:11 -0500
commita6308cea602f688ac653e3466cd57767e02093a9 (patch)
treeb460e09606dcd9148ade67a1ec758df185addf20
parentf7b8560f23ac5582e2f97dc9f6de32a42e61e520 (diff)
xwayland: fix 'buffer' may be used uninitialized warning
Fix the following warning due to --disable-glamor: CC Xwayland-xwayland.o In file included from /home/pq/local/include/wayland-client.h:40:0, from xwayland.h:35, from xwayland.c:26: xwayland.c: In function ‘block_handler’: /home/pq/local/include/wayland-client-protocol.h:3446:2: warning: ‘buffer’ may be used uninitialized in this function [-Wmaybe-uninitialized] wl_proxy_marshal((struct wl_proxy *) wl_surface, ^ xwayland.c:466:23: note: ‘buffer’ was declared here struct wl_buffer *buffer; ^ Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
-rw-r--r--hw/xwayland/xwayland.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
index c2ac4b3ff..9d795544d 100644
--- a/hw/xwayland/xwayland.c
+++ b/hw/xwayland/xwayland.c
@@ -474,8 +474,8 @@ xwl_window_post_damage(struct xwl_window *xwl_window)
#if GLAMOR_HAS_GBM
if (xwl_screen->glamor)
buffer = xwl_glamor_pixmap_get_wl_buffer(pixmap);
+ else
#endif
- if (!xwl_screen->glamor)
buffer = xwl_shm_pixmap_get_wl_buffer(pixmap);
wl_surface_attach(xwl_window->surface, buffer, 0, 0);