[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v7 2/3] x86: add domctl cmd to set/get CDP code/data CBM
>>> On 15.10.15 at 17:10, <wei.liu2@xxxxxxxxxx> wrote: > On Thu, Oct 15, 2015 at 04:57:16PM +0200, Olaf Hering wrote: >> On Tue, Oct 13, He Chen wrote: >> >> > +int psr_set_l3_cbm(struct domain *d, unsigned int socket, >> > + uint64_t cbm, enum cbm_type type) >> > { >> >> > + uint64_t cbm_data, cbm_code; >> >> > + switch ( type ) >> > { >> >> > + case PSR_CBM_TYPE_L3: >> > + cbm_code = cbm; >> > + break; >> >> > + case PSR_CBM_TYPE_L3_CODE: >> > + cbm_code = cbm; >> > + break; >> >> > + case PSR_CBM_TYPE_L3_DATA: >> > + cbm_code = map[old_cos].code; >> > + break; >> > + >> > + default: >> > + ASSERT_UNREACHABLE(); >> >> > + cos = find_cos(map, cos_max, cbm_code, cbm_data, cdp_enabled); >> >> gcc5 does not like ASSERT_UNREACHABLE(), whatever is in staging fails: >> >> [ 2144s] psr.c: In function 'psr_set_l3_cbm': >> [ 2144s] psr.c:381:25: error: 'cbm_code' may be used uninitialized in this >> function [-Werror=maybe-uninitialized] >> [ 2144s] struct cos_cbm_info info = >> [ 2144s] ^ >> [ 2144s] psr.c:442:24: note: 'cbm_code' was declared here >> [ 2144s] uint64_t cbm_data, cbm_code; >> [ 2144s] ^ >> [ 2144s] psr.c:513:27: error: 'cbm_data' may be used uninitialized in this >> function [-Werror=maybe-uninitialized] >> [ 2144s] map[cos].data = cbm_data; >> [ 2144s] ^ >> [ 2145s] cc1: all warnings being treated as errors >> [ 2145s] /home/abuild/rpmbuild/BUILD/xen-4.7.31795/non-dbg/xen/Rules.mk:174: >> recipe for target 'psr.o' failed >> [ 2145s] make[4]: *** [psr.o] Error 1 >> > > Is it because in non-debug build ASSERT_UNREACHABLE is nop? Ah, yes, in cases like this it should always be followed by return (or whatever else is suitable). Sorry for not having spotted this during review. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |