[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [[PATCH]] libxl/arm: Fix ARM build.



From: Andrii Anisov <andrii_anisov@xxxxxxxx>

Some compilers do not (validly?) detect that size will always be
initialized when (rc > 0), so implicitly initialize it.

Signed-off-by: Julien Grall <julien.grall@xxxxxxx>
---
 tools/libxl/libxl_arm_acpi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/libxl/libxl_arm_acpi.c b/tools/libxl/libxl_arm_acpi.c
index db113db..f61aec6 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) +
-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.