From: Marc-André Lureau Date: Thu, 28 Mar 2024 10:20:34 +0000 (+0400) Subject: util/coroutine: fix -Werror=maybe-uninitialized false-positive X-Git-Tag: v9.2.0-rc0~64^2~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=25bc7d16fa96b0ff881c83ed225ea380fe427c78;p=thirdparty%2Fqemu.git util/coroutine: fix -Werror=maybe-uninitialized false-positive ../util/qemu-coroutine.c:150:8: error: ‘batch’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Hajnoczi --- diff --git a/util/qemu-coroutine.c b/util/qemu-coroutine.c index eb4eebefdfb..64d6264fc74 100644 --- a/util/qemu-coroutine.c +++ b/util/qemu-coroutine.c @@ -136,7 +136,7 @@ static Coroutine *coroutine_pool_get_local(void) static void coroutine_pool_refill_local(void) { CoroutinePool *local_pool = get_ptr_local_pool(); - CoroutinePoolBatch *batch; + CoroutinePoolBatch *batch = NULL; WITH_QEMU_LOCK_GUARD(&global_pool_lock) { batch = QSLIST_FIRST(&global_pool);