From 387eedebf60a463ba30833588f10123da296ba4d Mon Sep 17 00:00:00 2001 From: Michael Tokarev Date: Sat, 5 Oct 2013 13:18:28 +0400 Subject: [PATCH] migration: Fix compiler warning ('caps' may be used uninitialized) Signed-off-by: Michael Tokarev Reviewed-by: Stefan Weil --- migration.c | 1 + 1 file changed, 1 insertion(+) diff --git a/migration.c b/migration.c index b4f8462ae4..2b1ab20c54 100644 --- a/migration.c +++ b/migration.c @@ -150,6 +150,7 @@ MigrationCapabilityStatusList *qmp_query_migrate_capabilities(Error **errp) MigrationState *s = migrate_get_current(); int i; + caps = NULL; /* silence compiler warning */ for (i = 0; i < MIGRATION_CAPABILITY_MAX; i++) { if (head == NULL) { head = g_malloc0(sizeof(*caps)); -- 2.11.0