nbd: fix -Werror=maybe-uninitialized false-positive

../nbd/client-connection.c:419:8: error: ‘wait_co’ may be used uninitialized [-Werror=maybe-uninitialized]

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
Marc-André Lureau 2024-03-28 14:20:37 +04:00
parent 0a0744f6d8
commit 73ce9bbf8a

View File

@ -410,7 +410,7 @@ nbd_co_establish_connection(NBDClientConnection *conn, NBDExportInfo *info,
*/ */
void nbd_co_establish_connection_cancel(NBDClientConnection *conn) void nbd_co_establish_connection_cancel(NBDClientConnection *conn)
{ {
Coroutine *wait_co; Coroutine *wait_co = NULL;
WITH_QEMU_LOCK_GUARD(&conn->mutex) { WITH_QEMU_LOCK_GUARD(&conn->mutex) {
wait_co = g_steal_pointer(&conn->wait_co); wait_co = g_steal_pointer(&conn->wait_co);