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

[xen stable-4.13] tool/libs/light: Fix libxenlight gcc warning



commit d204083a01ccf13df9f6e03e423476b9d8a85c85
Author:     Bertrand Marquis <bertrand.marquis@xxxxxxx>
AuthorDate: Wed Oct 7 14:57:02 2020 +0100
Commit:     Ian Jackson <iwj@xxxxxxxxxxxxxx>
CommitDate: Mon Nov 9 17:48:16 2020 +0000

    tool/libs/light: Fix libxenlight gcc warning
    
    Fix gcc10 compilation warning about uninitialized variable by setting
    it to 0.
    
    Signed-off-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>
    Acked-by: Wei Liu <wl@xxxxxxx>
    (cherry picked from commit 0241809bf838875615797f52af34222e5ab8e98f)
---
 tools/libxl/libxl_mem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/libxl/libxl_mem.c b/tools/libxl/libxl_mem.c
index 7c01fac7e5..f5ba1e2234 100644
--- a/tools/libxl/libxl_mem.c
+++ b/tools/libxl/libxl_mem.c
@@ -560,7 +560,7 @@ out:
 
 int libxl_get_free_memory_0x040700(libxl_ctx *ctx, uint32_t *memkb)
 {
-    uint64_t my_memkb;
+    uint64_t my_memkb = 0;
     int rc;
 
     rc = libxl_get_free_memory(ctx, &my_memkb);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.13



 


Rackspace

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