Re: [libvirt] [PATCH 2/2] qemuProcessVerifyGuestCPU: Avoid coverity false positive

2016-03-31 Thread John Ferlan
On 03/31/2016 11:28 AM, Michal Privoznik wrote: > On 31.03.2016 17:06, Ján Tomko wrote: >> On Thu, Mar 31, 2016 at 04:48:24PM +0200, Michal Privoznik wrote: >>> We use _LAST items in enums to mark the last position in given >>> enum. Now, if and enum is passed to switch(), compiler checks >>> tha

Re: [libvirt] [PATCH 2/2] qemuProcessVerifyGuestCPU: Avoid coverity false positive

2016-03-31 Thread Michal Privoznik
On 31.03.2016 17:06, Ján Tomko wrote: > On Thu, Mar 31, 2016 at 04:48:24PM +0200, Michal Privoznik wrote: >> We use _LAST items in enums to mark the last position in given >> enum. Now, if and enum is passed to switch(), compiler checks >> that all the values from enum occur in 'case' enumeration.

Re: [libvirt] [PATCH 2/2] qemuProcessVerifyGuestCPU: Avoid coverity false positive

2016-03-31 Thread Ján Tomko
On Thu, Mar 31, 2016 at 04:48:24PM +0200, Michal Privoznik wrote: > We use _LAST items in enums to mark the last position in given > enum. Now, if and enum is passed to switch(), compiler checks > that all the values from enum occur in 'case' enumeration. > Including _LAST. But coverity spots it's

[libvirt] [PATCH 2/2] qemuProcessVerifyGuestCPU: Avoid coverity false positive

2016-03-31 Thread Michal Privoznik
We use _LAST items in enums to mark the last position in given enum. Now, if and enum is passed to switch(), compiler checks that all the values from enum occur in 'case' enumeration. Including _LAST. But coverity spots it's a dead code. And it really is. So to resolve this, we tend to put a commen