diff --git a/src/libxl/xen_xl.c b/src/libxl/xen_xl.c index 77f9f112f0..1cc42fa59f 100644 --- a/src/libxl/xen_xl.c +++ b/src/libxl/xen_xl.c @@ -1525,7 +1525,9 @@ xenFormatXLDiskSrc(virStorageSource *src, char **srcstr) case VIR_STORAGE_TYPE_VHOST_USER: case VIR_STORAGE_TYPE_NONE: case VIR_STORAGE_TYPE_LAST: - break; + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("unsupported storage type for this code path")); + return -1; } return 0; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 85c5973339..cde6ab4dde 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1638,10 +1638,11 @@ qemuBuildDriveSourceStr(virDomainDiskDef *disk, case VIR_STORAGE_TYPE_VHOST_USER: case VIR_STORAGE_TYPE_NONE: case VIR_STORAGE_TYPE_LAST: - break; + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("unsupported storage type for this code path")); + return -1; } - virBufferAddLit(buf, ","); if (encinfo) {