module/river: fix “use of uninitialized variable” warning

There were “goto err” statements before “unlock_at_exit” had been
initialized.
This commit is contained in:
Daniel Eklöf 2022-10-03 09:52:44 +02:00
parent 4143099e94
commit 8d5deda4e4
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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;