On Tue, 2021-01-12 at 19:56 +0100, Peter Krempa wrote:
On Tue, Jan 12, 2021 at 18:47:36 +0100, Andrea Bolognani wrote:
> + switch (balloon->model) {
This is an 'int'. Please typecast it appropriately ...
> + case VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO:
> + name = "virtio-balloon-pci";
> + break;
> + case VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO_TRANSITIONAL:
> + name = "virtio-balloon-pci-transitional";
> + break;
> + case VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO_NON_TRANSITIONAL:
> + name = "virtio-balloon-pci-non-transitional";
> + break;
> + case VIR_DOMAIN_MEMBALLOON_MODEL_XEN:
> + case VIR_DOMAIN_MEMBALLOON_MODEL_NONE:
> + virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
> + _("invalid model for virtio-balloon-pci"));
> + return;
> + case VIR_DOMAIN_MEMBALLOON_MODEL_LAST:
> + default:
> + virReportEnumRangeError(virDomainMemballoonModel,
> + balloon->model);
> + return;
... so that this actually makes sense and is kept up to date.
Right you are! Very good catch, thank you :)
Do you want me to respin, or can I just add the
virDomainMemballoonModel cast before pushing?
--
Andrea Bolognani / Red Hat / Virtualization