瀏覽代碼

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 <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Marc-André Lureau 1 年之前
父節點
當前提交
25bc7d16fa
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      util/qemu-coroutine.c

+ 1 - 1
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);