From 51c1e4aed19ad31a93eeb36cd9ca2d7b889897c1 Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Thu, 22 Feb 2024 23:13:36 +0100 Subject: [PATCH] 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. --- xwayland/xwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xwayland/xwm.c b/xwayland/xwm.c index 75666810..2f80062a 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -171,7 +171,7 @@ static struct wlr_xwayland_surface *xwayland_surface_create( xcb_get_geometry_cookie_t geometry_cookie = 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) { xcb_res_client_id_spec_t spec = { .client = window_id,