Messages in this thread | | | Date | Mon, 3 May 2021 15:51:18 +0200 | From | David Sterba <> | Subject | Re: [PATCH] btrfs: initialize return variable |
| |
On Fri, Apr 30, 2021 at 11:06:55AM -0700, trix@redhat.com wrote: > From: Tom Rix <trix@redhat.com> > > Static analysis reports this problem > free-space-cache.c:3965:2: warning: Undefined or garbage value returned > return ret; > ^~~~~~~~~~ > > ret is set in the node handling loop. > Treat doing nothing as a success and initialize ret to 0.
Right, though it's unlikely the loop won't run at least once, having the ret initialized is safe. Patch added to misc-next, thanks.
| |