]> git.ipfire.org Git - thirdparty/libvirt.git/commit
build: avoid spurious compiler warning
authorEric Blake <eblake@redhat.com>
Wed, 11 Jan 2012 13:32:52 +0000 (06:32 -0700)
committerEric Blake <eblake@redhat.com>
Wed, 11 Jan 2012 13:32:52 +0000 (06:32 -0700)
commit18262b5587026294b4fb02ae01849572d4fdc0f8
tree39363a3ab66b8cf774b5e0fdc703f9bf7d3a77c5
parenta20cc3cc4f47ef6e706e9bda764401caaa2a10c2
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.
src/conf/nwfilter_params.c