Message ID | 579cfa6e71a5a1392a5ae40cef358c4e8e3a0901.1602078276.git.bertrand.marquis@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v3,1/2] tools/libs/stat: use memcpy instead of strncpy in getBridge | expand |
On Wed, Oct 07, 2020 at 02:57:02PM +0100, Bertrand Marquis wrote: > Fix gcc10 compilation warning about uninitialized variable by setting > it to 0. > > Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com> Applied.
diff --git a/tools/libs/light/libxl_mem.c b/tools/libs/light/libxl_mem.c index e52a9624ea..c739d00f39 100644 --- a/tools/libs/light/libxl_mem.c +++ b/tools/libs/light/libxl_mem.c @@ -562,7 +562,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);
Fix gcc10 compilation warning about uninitialized variable by setting it to 0. Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com> --- Changes in v3: Rebase --- tools/libs/light/libxl_mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)