On Fri, Jul 08, 2016 at 06:05:16PM +0200, David Sterba wrote: > On Tue, May 03, 2016 at 04:30:54PM -0700, Liu Bo wrote: > > > Just a heads up that this seems to introduce a valid warning, since it now > > > can goto error before the first initializing use of path: > > > > > > fs/btrfs/volumes.c: In function 'btrfs_balance': > > > fs/btrfs/volumes.c:3601:2: warning: 'path' may be used uninitialized > > > in this function [-Wmaybe-uninitialized] > > > btrfs_free_path(path); > > > ^ > > > fs/btrfs/volumes.c:3385:21: note: 'path' was declared here > > > struct btrfs_path *path; > > > ^ > > > (it's really in __btrfs_balance which got inlined, so gcc thinks it's > > > at the call site). > > > > > > Simply setting path = NULL at the beginning of __btrfs_balance fixes it, > > > since > > > btrfs_free_path allows NULL values. > > > > That's right, it's weird that I didn't get this warning while testing it. > > > > Thanks for catching it, Holger. > > Please send a v2, the patch is desiable.
Oh, I almost forgot this one, thanks for the reminder. Thanks, -liubo -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html