Message ID | cover.1694428549.git.wqu@suse.com (mailing list archive) |
---|---|
Headers | show |
Series | btrfs-progs: fix all -Wshadow warnings and enable -Wshadow for default builds | expand |
On Mon, Sep 11, 2023 at 08:10:31PM +0930, Qu Wenruo wrote: > Recently David fixes quite some errno usage in kernel code, to avoid > overwriting user space @errno variable. > > This inspired me that, those problems can be detected by -Wshadow, thus > let's enable -Wshadow for default builds. > > The biggest cause of -Wshadow warnings is min()/max() which all uses the > same __x and __y. > To fix that, pull the kernel version with the usage of __UNIQUE_ID() to > address the problem. > > The remaining ones are mostly bad namings and harmless, but there is > still some bad ones, detailed in the 2nd patch. > > Tested with both GCC 13.2.1 and Clang 16.0.6, the first one is fully > clean, the latter one has some unrelated warnings, but no -Wshadow > warnings. > > Qu Wenruo (3): > btrfs-progs: pull in the full max/min/clamp implementation from kernel > btrfs-progs: fix all variable shadowing > btrfs-progs: enable -Wshadow for default build Added to devel, thanks.