[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] staging aarch64 build fails in xc_dom_arm.c
On 30/05/17 16:27, Olaf Hering wrote: > With gcc7 the aarch64 build in staging fails: > > xc_dom_arm.c: In function 'meminit': > xc_dom_arm.c:229:31: error: 'domctl.u.address_size.size' may be used > uninitialized in this function [-Werror=maybe-uninitialized] > if ( domctl.u.address_size.size == 0 ) > ~~~~~~~~~~~~~~~~~~~~~^~~~~ That's because it really will be uninitialised if the caller passes anything other than "xen-3.0-aarch64" or "xen-3.0-armv7l" into guest type. Does diff --git a/tools/libxc/xc_dom_arm.c b/tools/libxc/xc_dom_arm.c index e7d4bd0..e669fb0 100644 --- a/tools/libxc/xc_dom_arm.c +++ b/tools/libxc/xc_dom_arm.c @@ -223,6 +223,8 @@ static int set_mode(xc_interface *xch, domid_t domid, char *guest_type) domctl.domain = domid; domctl.cmd = XEN_DOMCTL_set_address_size; + domctl.u.address_size.size = 0; + for ( i = 0; i < ARRAY_SIZE(types); i++ ) if ( !strcmp(types[i].guest, guest_type) ) domctl.u.address_size.size = types[i].size; help? ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |