mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
Fix building with -Og
When building using -Og, gcc sees that some variables can be used
uninitialized It can be debatable whether it is possible with our
codeflow, but functions should be self-contained and initializations are
always good. The return instead of goto is due to actualType being used
in the cleanup.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 3470cd860d
)
This commit is contained in:
parent
7fdce1e41b
commit
942b6abe4a
@ -4190,7 +4190,7 @@ lxcDomainAttachDeviceNetLive(virConnectPtr conn,
|
|||||||
if (!priv->initpid) {
|
if (!priv->initpid) {
|
||||||
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||||
_("Cannot attach disk until init PID is known"));
|
_("Cannot attach disk until init PID is known"));
|
||||||
goto cleanup;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* preallocate new slot for device */
|
/* preallocate new slot for device */
|
||||||
|
@ -1570,7 +1570,7 @@ iptablesCreateRuleInstanceStateCtrl(virFirewallPtr fw,
|
|||||||
const char *ifname,
|
const char *ifname,
|
||||||
virNWFilterVarCombIterPtr vars)
|
virNWFilterVarCombIterPtr vars)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc = 0;
|
||||||
bool directionIn = false;
|
bool directionIn = false;
|
||||||
char chainPrefix[2];
|
char chainPrefix[2];
|
||||||
bool maySkipICMP, inout = false;
|
bool maySkipICMP, inout = false;
|
||||||
|
@ -817,7 +817,7 @@ virBitmapLastSetBit(virBitmapPtr bitmap)
|
|||||||
ssize_t i;
|
ssize_t i;
|
||||||
int unusedBits;
|
int unusedBits;
|
||||||
ssize_t sz;
|
ssize_t sz;
|
||||||
unsigned long bits;
|
unsigned long bits = 0;
|
||||||
|
|
||||||
unusedBits = bitmap->map_len * VIR_BITMAP_BITS_PER_UNIT - bitmap->max_bit;
|
unusedBits = bitmap->map_len * VIR_BITMAP_BITS_PER_UNIT - bitmap->max_bit;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user