Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1362451
| From | David Sterba <dsterba@suse.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] btrfs: fix build warning |
| Date | 2016-03-22 11:10 +0100 |
| Message-ID | <rfrq9-2RD-5@gated-at.bofh.it> (permalink) |
| References | <r2IRQ-5aD-19@gated-at.bofh.it> <rfr6O-2uL-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Mar 22, 2016 at 10:39:59AM +0100, Geert Uytterhoeven wrote: > On Tue, Feb 16, 2016 at 9:02 AM, Sudip Mukherjee > <sudipm.mukherjee@gmail.com> wrote: > > We were getting build warning about: > > fs/btrfs/extent-tree.c:7021:34: warning: ‘used_bg’ may be used > > uninitialized in this function > > > > It is not a valid warning as used_bg is never used uninitilized since > > locked is initially false so we can never be in the section where > > 'used_bg' is used. But gcc is not able to understand that and we can > > initialize it while declaring to silence the warning. > > > > Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> > > FWIW, I've posted an alternative patch that killed the silly locked variable > a while ago. > "[PATCH] Btrfs: Refactor btrfs_lock_cluster() to kill compiler warning" > https://lkml.org/lkml/2014/6/22/96 The cleanup looks great, thanks, patch picked.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH] btrfs: fix build warning Geert Uytterhoeven <geert@linux-m68k.org> - 2016-03-22 10:50 +0100 Re: [PATCH] btrfs: fix build warning David Sterba <dsterba@suse.cz> - 2016-03-22 11:10 +0100
csiph-web