From 7cea863719f83b2489e939e9f5a9acce060ec21d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 28 Mar 2024 14:20:45 +0400 Subject: migration: fix -Werror=maybe-uninitialized false-positives MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ../migration/dirtyrate.c:186:5: error: ‘records’ may be used uninitialized [-Werror=maybe-uninitialized] ../migration/dirtyrate.c:168:12: error: ‘gen_id’ may be used uninitialized [-Werror=maybe-uninitialized] ../migration/migration.c:2273:5: error: ‘file’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau Acked-by: Peter Xu Reviewed-by: Hyman Huang --- migration/migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'migration/migration.c') diff --git a/migration/migration.c b/migration/migration.c index ae2be31557..021faee2f3 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -2278,7 +2278,7 @@ static bool migrate_handle_rp_resume_ack(MigrationState *s, */ static void migration_release_dst_files(MigrationState *ms) { - QEMUFile *file; + QEMUFile *file = NULL; WITH_QEMU_LOCK_GUARD(&ms->qemu_file_lock) { /* -- cgit v1.2.3