mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-03 07:33:50 +00:00
conf/nwfilter: Initialize size_t attr to zero
Newer GCC (13.1.1 in my case) wrongly reports "maybe uninitialized" warning for this variable inside the next condition. Even though this accusation is wrong (the condition is guarded by the same condition as the for cycle initializing it), initialize it during the declaration so compilation errors don't stop others and maybe also future proof the code for changes. Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
e31ac985f5
commit
078e645cc3
@ -2393,7 +2393,7 @@ virNWFilterRuleParse(xmlNodePtr node)
|
||||
|
||||
if (nattrNodes > 0) {
|
||||
size_t i;
|
||||
size_t attr;
|
||||
size_t attr = 0;
|
||||
|
||||
/* First we look up the type of the first valid element. The rest of
|
||||
* the parsing then only considers elements with same name. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user