diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 1a9550e438..5618c09939 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -4183,7 +4183,7 @@ lxcDomainAttachDeviceNetLive(virConnectPtr conn, if (!priv->initpid) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("Cannot attach disk until init PID is known")); - goto cleanup; + return -1; } /* preallocate new slot for device */ diff --git a/src/nwfilter/nwfilter_ebiptables_driver.c b/src/nwfilter/nwfilter_ebiptables_driver.c index 423d069e1b..b7be2917e2 100644 --- a/src/nwfilter/nwfilter_ebiptables_driver.c +++ b/src/nwfilter/nwfilter_ebiptables_driver.c @@ -1570,7 +1570,7 @@ iptablesCreateRuleInstanceStateCtrl(virFirewallPtr fw, const char *ifname, virNWFilterVarCombIterPtr vars) { - int rc; + int rc = 0; bool directionIn = false; char chainPrefix[2]; bool maySkipICMP, inout = false; diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c index 57135a09f7..c94764792f 100644 --- a/src/util/virbitmap.c +++ b/src/util/virbitmap.c @@ -724,7 +724,7 @@ virBitmapLastSetBit(virBitmapPtr bitmap) ssize_t i; int unusedBits; ssize_t sz; - unsigned long bits; + unsigned long bits = 0; unusedBits = bitmap->map_len * VIR_BITMAP_BITS_PER_UNIT - bitmap->max_bit;