[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] 4.9.0-rcX can not be built for ARM64
On 13/05/2017 13:38, Andrii Anisov wrote: Dear All, Hi Andrii, During the XEN 4.9.0-rc4 testing on Renesas R-Car Gen3 platform I faced a bug at compilation step. Thank you for testing Xen on your board. Again, the libxl_arm_acpi.c can not be built: | In file included from libxl_arm.h:17:0, | from libxl_arm_acpi.c:19: | libxl_arm_acpi.c: In function 'libxl__get_acpi_size': | libxl_internal.h:129:44: error: 'size' may be used uninitialized in this function [-Werror=maybe-uninitialized] | (((unsigned long)(_val)+(1UL<<(_order))-1) & ~((1UL<<(_order))-1)) | ^ | libxl_arm_acpi.c:101:14: note: 'size' was declared here | uint64_t size; | ^ | libxl_arm_acpi.c: In function 'libxl__prepare_acpi': | libxl_arm_acpi.c:152:33: error: 'size' may be used uninitialized in this function [-Werror=maybe-uninitialized] | dom->acpi_modules[0].length += ROUNDUP(acpitables[MADT].size, 3); | ^ | libxl_arm_acpi.c:126:12: note: 'size' was declared here | size_t size; | ^ It looks like you compiler does not (validly?) detect that size will always be initialized when (rc > 0). Can you try this small patch below: diff --git a/tools/libxl/libxl_arm_acpi.c b/tools/libxl/libxl_arm_acpi.c index db113dbf85..f61aec672b 100644 --- a/tools/libxl/libxl_arm_acpi.c +++ b/tools/libxl/libxl_arm_acpi.c @@ -73,6 +73,8 @@ static int libxl__estimate_madt_size(libxl__gc *gc, { int rc = 0; + *size = 0; + switch (info->arch_arm.gic_version) { case LIBXL_GIC_VERSION_V2: *size = sizeof(struct acpi_table_madt) + Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |