From 8d5deda4e40bbebe060283160c9bcdea35b1c656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Mon, 3 Oct 2022 09:52:44 +0200 Subject: [PATCH] =?UTF-8?q?module/river:=20fix=20=E2=80=9Cuse=20of=20unini?= =?UTF-8?q?tialized=20variable=E2=80=9D=20warning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There were “goto err” statements before “unlock_at_exit” had been initialized. --- modules/river.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/river.c b/modules/river.c index 23ac032..16e34f5 100644 --- a/modules/river.c +++ b/modules/river.c @@ -637,6 +637,7 @@ run(struct module *mod) int ret = 1; struct wl_display *display = NULL; struct wl_registry *registry = NULL; + bool unlock_at_exit = false; if ((display = wl_display_connect(NULL)) == NULL) { LOG_ERR("no Wayland compositor running?"); @@ -659,8 +660,8 @@ run(struct module *mod) wl_display_roundtrip(display); - bool unlock_at_exit = true; mtx_lock(&mod->lock); + unlock_at_exit = true; m->is_starting_up = false;