Re: [libvirt] [PATCH v2 14/42] m4: enforce that all enum cases are listed in switch statements

2018-02-19 Thread John Ferlan
On 02/15/2018 11:43 AM, Daniel P. Berrangé wrote: > As a general rule any time we switch() on something that is an enum, we > want to have a case for every enum constant. The -Wswitch warning will > report any switch where we've violated this rule, except if that switch > has a default case. >

[libvirt] [PATCH v2 14/42] m4: enforce that all enum cases are listed in switch statements

2018-02-15 Thread Daniel P . Berrangé
As a general rule any time we switch() on something that is an enum, we want to have a case for every enum constant. The -Wswitch warning will report any switch where we've violated this rule, except if that switch has a default case. Unfortunately it is reasonable to want to list all enum