xwayland/xwm: Initialize client_id_cookie

scan-build is a little confused, thinking xwm->xres value could change
during the execution of xwayland_surface_create so client_id_cookie
could end up used uninitialized.

The struct is just an unsigned int, so no harm in initializing it to get
it off the list.
This commit is contained in:
Kenny Levinsen 2024-02-22 23:13:36 +01:00
parent 2b1c0ffdd0
commit 51c1e4aed1

View file

@ -171,7 +171,7 @@ static struct wlr_xwayland_surface *xwayland_surface_create(
xcb_get_geometry_cookie_t geometry_cookie = xcb_get_geometry_cookie_t geometry_cookie =
xcb_get_geometry(xwm->xcb_conn, window_id); xcb_get_geometry(xwm->xcb_conn, window_id);
xcb_res_query_client_ids_cookie_t client_id_cookie; xcb_res_query_client_ids_cookie_t client_id_cookie = { 0 };
if (xwm->xres) { if (xwm->xres) {
xcb_res_client_id_spec_t spec = { xcb_res_client_id_spec_t spec = {
.client = window_id, .client = window_id,