]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fix two uninitialized variable warnings
authorMatthias Bolte <matthias.bolte@googlemail.com>
Tue, 10 May 2011 06:39:56 +0000 (08:39 +0200)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Tue, 10 May 2011 06:39:56 +0000 (08:39 +0200)
gcc only reports them when compiling with -O3.

src/util/interface.c
tools/virsh.c

index 5e1987adc4d3a5c519d33f85cb36f44d2512cfcf..04a922c939853f2910eb7bedb2f0489127e8d263 100644 (file)
@@ -91,7 +91,7 @@ ifaceGetFlags(const char *ifname, short *flags) {
 
 int
 ifaceIsUp(const char *ifname, bool *up) {
-    short flags;
+    short flags = 0;
     int rc = ifaceGetFlags(ifname, &flags);
 
     if (rc)
index 2b1671403a1b1e65beffb7c68698508907044611..8b5572c8109990b01e19cd4defd7bc77b554790f 100644 (file)
@@ -2857,7 +2857,7 @@ static bool
 cmdSetvcpus(vshControl *ctl, const vshCmd *cmd)
 {
     virDomainPtr dom;
-    int count;
+    int count = 0;
     bool ret = true;
     int maximum = vshCommandOptBool(cmd, "maximum");
     int config = vshCommandOptBool(cmd, "config");