mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: snapshot: Use typecasted switch in qemuDomainSnapshotPrepare()
Convert the switch to a typecasted value so that the compiler tracks additions for us.
This commit is contained in:
parent
5c13c3202f
commit
68c15a4f8b
@ -12635,7 +12635,7 @@ qemuDomainSnapshotPrepare(virConnectPtr conn,
|
|||||||
virDomainSnapshotDiskDefPtr disk = &def->disks[i];
|
virDomainSnapshotDiskDefPtr disk = &def->disks[i];
|
||||||
virDomainDiskDefPtr dom_disk = vm->def->disks[i];
|
virDomainDiskDefPtr dom_disk = vm->def->disks[i];
|
||||||
|
|
||||||
switch (disk->snapshot) {
|
switch ((virDomainSnapshotLocation) disk->snapshot) {
|
||||||
case VIR_DOMAIN_SNAPSHOT_LOCATION_INTERNAL:
|
case VIR_DOMAIN_SNAPSHOT_LOCATION_INTERNAL:
|
||||||
found_internal = true;
|
found_internal = true;
|
||||||
|
|
||||||
@ -12692,7 +12692,7 @@ qemuDomainSnapshotPrepare(virConnectPtr conn,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case VIR_DOMAIN_SNAPSHOT_LOCATION_DEFAULT:
|
case VIR_DOMAIN_SNAPSHOT_LOCATION_DEFAULT:
|
||||||
default:
|
case VIR_DOMAIN_SNAPSHOT_LOCATION_LAST:
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("unexpected code path"));
|
_("unexpected code path"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
Loading…
Reference in New Issue
Block a user