Skip to contentSkip to conversation

] libxl/arm: Fix ARM build.

PATCH In review Andrii Anisov 3 participants 3 messages May 16, 2017 – May 17, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ] libxl/arm: Fix ARM build.

From: Andrii Anisov <[email protected]>

Initialise *size in default branch to prevent certain compilers (i.e. Linaro GCC 5.2-2015.11-2) from reporting "variable may be used uninitialized" errors in caller function.

---
 tools/libxl/libxl_arm_acpi.c | 1 +
 1 file changed, 1 insertion(+)
tools/libxl/libxl_arm_acpi.c +1 -0
index db113db..a6456be 100644
@@ -87,6 +87,7 @@ static int libxl__estimate_madt_size(libxl__gc *gc,
         break;
     default:
         LOG(ERROR, "Unknown GIC version");
+        *size = 0;
         rc = ERROR_FAIL;
         break;
     }
Signature · 7 lines
2.7.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Acked-by on v2 1/1
#1 lore raw
Quoted 7 lines · Andrii Anisov

From: Andrii Anisov <[email protected]>

Initialise *size in default branch to prevent certain compilers (i.e. Linaro GCC 5.2-2015.11-2) from reporting "variable may be used uninitialized" errors in caller function.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#2 lore raw

Hi,

Quoted 10 lines · Wei Liu
Quoted 7 lines · Andrii Anisov

From: Andrii Anisov <[email protected]>

Initialise *size in default branch to prevent certain compilers (i.e. Linaro GCC 5.2-2015.11-2) from reporting "variable may be used uninitialized" errors in caller function.

Cheers,

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel