From: Peter Krempa Date: Tue, 20 May 2014 08:38:42 +0000 (+0200) Subject: qemu: snapshot: Use typecasted switch in qemuDomainSnapshotPrepare() X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=68c15a4f8b7d93123db488375cfc6d4be42ebdf2;p=libvirt.git qemu: snapshot: Use typecasted switch in qemuDomainSnapshotPrepare() Convert the switch to a typecasted value so that the compiler tracks additions for us. --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index c8a002977e..aa07ef6fed 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -12635,7 +12635,7 @@ qemuDomainSnapshotPrepare(virConnectPtr conn, virDomainSnapshotDiskDefPtr disk = &def->disks[i]; virDomainDiskDefPtr dom_disk = vm->def->disks[i]; - switch (disk->snapshot) { + switch ((virDomainSnapshotLocation) disk->snapshot) { case VIR_DOMAIN_SNAPSHOT_LOCATION_INTERNAL: found_internal = true; @@ -12692,7 +12692,7 @@ qemuDomainSnapshotPrepare(virConnectPtr conn, break; case VIR_DOMAIN_SNAPSHOT_LOCATION_DEFAULT: - default: + case VIR_DOMAIN_SNAPSHOT_LOCATION_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("unexpected code path")); goto cleanup;