]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: snapshot: Use typecasted switch in qemuDomainSnapshotPrepare()
authorPeter Krempa <pkrempa@redhat.com>
Tue, 20 May 2014 08:38:42 +0000 (10:38 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 20 May 2014 17:28:10 +0000 (19:28 +0200)
Convert the switch to a typecasted value so that the compiler tracks
additions for us.

src/qemu/qemu_driver.c

index c8a002977ecc16d15df97b63ea9e3cf1f1ae4810..aa07ef6fed7b524d1ca01ec8d058dc5227bb2021 100644 (file)
@@ -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;