From: Roman Bogorodskiy Date: Sun, 26 Mar 2017 04:29:49 +0000 (+0400) Subject: qemu: fix build with clang X-Git-Tag: v3.2.0-rc1~134 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4035baebb7799a3162922befa0b43821aae9b65d;p=thirdparty%2Flibvirt.git qemu: fix build with clang qemuMigrationResetTLS() does not initialize 'ret' by default, so when it jumps to 'cleanup' on error, the 'ret' variable will be uninitialized, which clang complains about. Set it to '-1' by default. --- diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index d91279ec6f..a69e8784ab 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -3815,7 +3815,7 @@ qemuMigrationResetTLS(virQEMUDriverPtr driver, char *tlsAlias = in_tlsAlias; char *secAlias = in_secAlias; qemuMonitorMigrationParams migParams = { 0 }; - int ret; + int ret = -1; /* If coming from a path that doesn't know whether it's been used or not, * let's first check we need to do this. If the tls-creds doesn't exist