On Fri, 2018-08-17 at 06:41 +0200, Bjoern Walk wrote:
Andrea Bolognani <abologna(a)redhat.com> [2018-08-16, 04:44PM
+0200]:
> On Tue, 2018-08-07 at 17:10 +0800, Yi Min Zhao wrote:
> > + 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?
The compiler can still catch that even when the 'default' case
is present, and having it will catch cases when a random number
has been assigned to the variable. We added 'default' cases to
all switch statements a while back.
--
Andrea Bolognani / Red Hat / Virtualization