From: Daniel P. Berrange Date: Thu, 5 May 2011 10:30:26 +0000 (+0100) Subject: Fix qemuMigrationToFile nonull annotation X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=f7fc885dec1bd65ebb336a60715b88616d2eb681;p=libvirt.git Fix qemuMigrationToFile nonull annotation The qemuMigrationToFile method was accidentally annotated for the 'compressor' parameter to be non-null, instead of the 'path' parameter. Thus GCC with -O2, unhelpfully deleted the entire 'if (compressor == NULL)' block of code during optimization. Thus NULL was passed to virCommandNew() with predictably bad results. * src/qemu/qemu_migration.h: Fix non-null annotation to be against path instead of compressor --- diff --git a/src/qemu/qemu_migration.h b/src/qemu/qemu_migration.h index f4e86c83ba..c0f3aa2a2e 100644 --- a/src/qemu/qemu_migration.h +++ b/src/qemu/qemu_migration.h @@ -64,7 +64,7 @@ int qemuMigrationToFile(struct qemud_driver *driver, virDomainObjPtr vm, int fd, off_t offset, const char *path, const char *compressor, bool is_reg, bool bypassSecurityDriver) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(6) + ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(5) ATTRIBUTE_RETURN_CHECK; #endif /* __QEMU_MIGRATION_H__ */