Re: [PATCH 0/6] btrfs: fix compiler warning with make W=1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 15, 2018 at 09:30:42AM +0800, Qu Wenruo wrote:
> BTW, could we just make "-Wunused-but-set-variable" default for btrfs
> module instead of following the global setting?

We'd need to fix all the warnings first, there are more left. We could
make it on by default for the debugging build though. I've checked that
the the macro from scripts/Makefile.extrawarn to detect the options is
available when building the module so, something like

ifeq(CONFIG_BTRFS_DEBUG,y)

warnings+=$(call cc-option,-Wunused-but-set-variable)
...

ccflags-y+=$(warnings)

endif

may be a good start.



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux