[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH v3 03/12] conf: Introduce a new PCI address extension flag



Andrea Bolognani <abologna redhat com> [2018-08-16, 04:44PM +0200]:
> On Tue, 2018-08-07 at 17:10 +0800, Yi Min Zhao wrote:
> [...]
> > +qemuDomainDeviceSupportZPCI(virDomainDeviceDefPtr device)
> > +{
> > +    switch ((virDomainDeviceType) device->type) {
> > +    case VIR_DOMAIN_DEVICE_CHR:
> > +        return false;
> > +
> > +    case VIR_DOMAIN_DEVICE_CONTROLLER:
> > +    case VIR_DOMAIN_DEVICE_DISK:
> > +    case VIR_DOMAIN_DEVICE_LEASE:
> > +    case VIR_DOMAIN_DEVICE_FS:
> > +    case VIR_DOMAIN_DEVICE_NET:
> > +    case VIR_DOMAIN_DEVICE_INPUT:
> > +    case VIR_DOMAIN_DEVICE_SOUND:
> > +    case VIR_DOMAIN_DEVICE_VIDEO:
> > +    case VIR_DOMAIN_DEVICE_HOSTDEV:
> > +    case VIR_DOMAIN_DEVICE_WATCHDOG:
> > +    case VIR_DOMAIN_DEVICE_GRAPHICS:
> > +    case VIR_DOMAIN_DEVICE_HUB:
> > +    case VIR_DOMAIN_DEVICE_REDIRDEV:
> > +    case VIR_DOMAIN_DEVICE_SMARTCARD:
> > +    case VIR_DOMAIN_DEVICE_MEMBALLOON:
> > +    case VIR_DOMAIN_DEVICE_NVRAM:
> > +    case VIR_DOMAIN_DEVICE_RNG:
> > +    case VIR_DOMAIN_DEVICE_SHMEM:
> > +    case VIR_DOMAIN_DEVICE_TPM:
> > +    case VIR_DOMAIN_DEVICE_PANIC:
> > +    case VIR_DOMAIN_DEVICE_MEMORY:
> > +    case VIR_DOMAIN_DEVICE_IOMMU:
> > +    case VIR_DOMAIN_DEVICE_VSOCK:
> > +        break;
> > +
> > +    case VIR_DOMAIN_DEVICE_NONE:
> > +    case VIR_DOMAIN_DEVICE_LAST:
> 
> Missing 'default' case.

I thought we explicitly don't want a default case so that the compiler
can catch this is another enum entry is added?

Attachment: signature.asc
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]