[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 5/5] libxl: Add explicit cast to libxl_psr_cat_set_cbm
On Tue, 2016-01-19 at 14:06 +0000, Ian Jackson wrote: > Chester Lin writes ("[PATCH v2 5/5] libxl: Add explicit cast to > libxl_psr_cat_set_cbm"): > > Fixes Coverity CID 1343299. The call to xc_psr_cat_set_domain_data() > > expects type xc_psr_cat_type but is provided libxl_psr_cbm_type which > > is defined in IDL. > > > > The two enums are deliberately identical and IDL only exists so that > > libxl clients don't need to include libxc headers directly. > > > > This change adds an explicit cast to fix the > > Coverity warning, and tweaks the surrounding code to more closely > > conform to the guidelines in CODING_STYLE. > > I can see why Coverity is complaining.ÂÂI think, overall, that the > existing situation is not really desirable. > > > In fact there are not two but *three* of these enums: > > Â* XEN_DOMCTL_PSR_CAT_OP_SET_L3_* (public/domctl.h) > Â* enum xc_psr_cat_type (xenctrl.h) > Â* Enumeration("psr_cbm_type",...) (libxl_types.idl) Forgot to say in my other reply, but we could try and abolish at least the xc one and have libxl internally use the domctl values. I should also have said I think all of this is a bit much to ask Chester to tackle given that the intro[0] explains that the Coverity stuff is just in order to gain some familiarity before embarking on a "proper" project. Ian. [0]Âhttp://lists.xen.org/archives/html/xen-devel/2015-12/msg00629.html _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |