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

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

 



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 a dead code. And it
> really is. So to resolve this, we tend to put a comment just
> above 'case ..._LAST' notifying coverity that we know this is a
> dead code but we want to have it that way.
> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  src/qemu/qemu_process.c | 2 ++
>  1 file changed, 2 insertions(+)
> 

ACK.

Would it be possible to somehow store a list of false positives
for Coverity to ignore in libvirt.git?
Like we do with tests/.valgrind.supp.

That way we would not need to clutter up the code.

Jan

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux