mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
build: avoid spurious compiler warning
For some weird reason, i686-pc-mingw32-gcc version 4.6.1 at -O2 complained: ../../src/conf/nwfilter_params.c: In function 'virNWFilterVarCombIterCreate': ../../src/conf/nwfilter_params.c:346:23: error: 'minValue' may be used uninitialized in this function [-Werror=uninitialized] ../../src/conf/nwfilter_params.c:319:28: note: 'minValue' was declared here ../../src/conf/nwfilter_params.c:344:23: error: 'maxValue' may be used uninitialized in this function [-Werror=uninitialized] ../../src/conf/nwfilter_params.c:319:18: note: 'maxValue' was declared here cc1: all warnings being treated as errors even though all paths of the preceding switch statement either assign the variables or return. * src/conf/nwfilter_params.c (virNWFilterVarCombIterAddVariable): Initialize variables.
This commit is contained in:
parent
a20cc3cc4f
commit
18262b5587
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* nwfilter_params.c: parsing and data maintenance of filter parameters
|
* nwfilter_params.c: parsing and data maintenance of filter parameters
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Red Hat, Inc.
|
* Copyright (C) 2011-2012 Red Hat, Inc.
|
||||||
* Copyright (C) 2010 IBM Corporation
|
* Copyright (C) 2010 IBM Corporation
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -316,7 +316,7 @@ virNWFilterVarCombIterAddVariable(virNWFilterVarCombIterEntryPtr cie,
|
|||||||
const virNWFilterVarAccessPtr varAccess)
|
const virNWFilterVarAccessPtr varAccess)
|
||||||
{
|
{
|
||||||
virNWFilterVarValuePtr varValue;
|
virNWFilterVarValuePtr varValue;
|
||||||
unsigned int maxValue, minValue;
|
unsigned int maxValue = 0, minValue = 0;
|
||||||
const char *varName = virNWFilterVarAccessGetVarName(varAccess);
|
const char *varName = virNWFilterVarAccessGetVarName(varAccess);
|
||||||
|
|
||||||
varValue = virHashLookup(hash->hashTable, varName);
|
varValue = virHashLookup(hash->hashTable, varName);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user