05.10.2013 13:15, Michael Tokarev пишет:
Okay. This takes just too long and too many people are affected. I'll just set the variable in question (caps) to NULL at entry for now, -- it is not a critical path and the current code is correct anyway. This is becoming ridiculous, when there are so many different opinions about such a trivial thing, with the result being that nothing is fixed. Setting it to NULL at least will let a buildbot to be fixed for now.
Forgot the patch itself. It is the shortest from all already proposed ;) Author: Michael Tokarev <m...@tls.msk.ru> Date: Sat Oct 5 13:18:28 2013 +0400 migration: Fix compiler warning ('caps' may be used uninitialized) Signed-off-by: Michael Tokarev <m...@tls.msk.ru> diff --git a/migration.c b/migration.c index b4f8462..2b1ab20 100644 --- a/migration.c +++ b/migration.c @@ -150,6 +150,7 @@ MigrationCapabilityStatusList *qmp_query_migrate_capabilitie 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)); Thanks, /mjt