From f7fc885dec1bd65ebb336a60715b88616d2eb681 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Thu, 5 May 2011 11:30:26 +0100 Subject: [PATCH] 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 --- src/qemu/qemu_migration.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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__ */ -- GitLab