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>
This commit is contained in:
parent
f7b8560f23
commit
a6308cea60
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue