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

[Xen-changelog] [xen-unstable] libxl: initialise some variables in print_bitmap, to suppress bogus warning



# HG changeset patch
# User Kamala Narasimhan <kamala.narasimhan@xxxxxxxxxx>
# Date 1297098166 0
# Node ID 9e463cb156586bfd50b8123664f1c290ca9f1f98
# Parent  005722613063d5a95005b2296979cdcad8eddfc3
libxl: initialise some variables in print_bitmap, to suppress bogus warning

GCC 4.2.4 cannot figure out that three variables aren't used before
initialisation:
 xl_cmdimpl.c: In function `print_domain_vcpuinfo':
 xl_cmdimpl.c:3351: warning: `firstset' may be used uninitialized in this 
function
[etc]

Signed-off-by: Kamala Narasimhan <kamala.narasimhan@xxxxxxxxxx>
Acked-by: Andre Przywara <andre.przywara@xxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/libxl/xl_cmdimpl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r 005722613063 -r 9e463cb15658 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Mon Feb 07 16:55:25 2011 +0000
+++ b/tools/libxl/xl_cmdimpl.c  Mon Feb 07 17:02:46 2011 +0000
@@ -3347,8 +3347,8 @@ static void print_bitmap(uint8_t *map, i
 static void print_bitmap(uint8_t *map, int maplen, FILE *stream)
 {
     int i;
-    uint8_t pmap, bitmask;
-    int firstset, state = 0;
+    uint8_t pmap = 0, bitmask = 0;
+    int firstset = 0, state = 0;
 
     for (i = 0; i < maplen; i++) {
         if (i % 8 == 0) {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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