WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] libxl: initialise some variables in print

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxl: initialise some variables in print_bitmap, to suppress bogus warning
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Wed, 09 Feb 2011 06:50:42 -0800
Delivery-date: Wed, 09 Feb 2011 06:53:18 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxl: initialise some variables in print_bitmap, to suppress bogus warning, Xen patchbot-unstable <=