[libvirt] [PATCH 32/41] cpu: Make x86ModelFromCPU a bit smarter

Jiri Denemark jdenemar at redhat.com
Thu Sep 15 11:57:29 UTC 2016


On Tue, Aug 30, 2016 at 17:52:24 -0400, John Ferlan wrote:
...
> > +            case VIR_CPU_FEATURE_DISABLE:
> > +            case VIR_CPU_FEATURE_FORBID:
> > +                x86DataSubtract(&model->data, &feature->data);
> > +                break;
> > +
> > +            case VIR_CPU_FEATURE_OPTIONAL:
> 
> [1]
> Coverity happlily points out that OPTIONAL is a DEAD_CODE path
> especially due to the prior check and continue;
> 
> I see no other sane way around it other than a comment before the case:
> 
>                /* coverity[dead_error_condition] */
>                case VIR_CPU_FEATURE_OPTIONAL:

Easy enough. Fixed.

Jirka




More information about the libvir-list mailing list