On Fri, Nov 13, 2015 at 11:50:03AM +0100, Alberto Garcia wrote: > On Fri 13 Nov 2015 11:15:52 AM CET, Stefan Hajnoczi <stefa...@gmail.com> > wrote: > > blockdev.c: In function ‘blockdev_init’: > > blockdev.c:636:17: error: ‘length’ may be used uninitialized in this > > function [-Werror=maybe-uninitialized] > > block_acct_add_interval(blk_get_stats(blk), length); > > ^ > > blockdev.c:597:22: note: ‘length’ was declared here > > unsigned length; > > ^ > > That's a false warning because length can only be uninitialized if > 'error' is set. > > gcc 5.2.1 does not complain here... anyway, this should fix it: > > for (entry = qlist_first(interval_list); entry; > entry = qlist_next(entry)) { > - unsigned length; > + unsigned length = 0; > switch (qobject_type(entry->value)) { > > Do you want me to send a new patch, or do you prefer to apply this > change in your branch? Thanks!
I just noticed another issue that will require another revision (unless I misread the code). Stefan
signature.asc
Description: PGP signature