Commit a6308cea authored by Pekka Paalanen's avatar Pekka Paalanen Committed by Adam Jackson

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's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
parent f7b8560f
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment