Re: [PATCH] xfs: devirtualize ->m_dirnameops

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

 



On Wed, Nov 13, 2019 at 07:59:18AM +0100, Christoph Hellwig wrote:
> On Tue, Nov 12, 2019 at 08:22:47PM -0800, Darrick J. Wong wrote:
> > > @@ -718,7 +718,7 @@ xfs_dir2_block_lookup_int(
> > >  		 * and buffer. If it's the first case-insensitive match, store
> > >  		 * the index and buffer and continue looking for an exact match.
> > >  		 */
> > > -		cmp = mp->m_dirnameops->compname(args, dep->name, dep->namelen);
> > > +		cmp = xfs_dir2_compname(args, dep->name, dep->namelen);
> > 
> > gcc complains about the unused @mp variable here.  With that fixed the
> > rest looks ok, so:
> 
> What gcc version do you use?  I see a consistent pattern lately that
> yours (correctly) find initialized but unused variable, but neither my
> local one nor the build bot does..

$ gcc --version
gcc (Ubuntu 8.3.0-6ubuntu1~18.04.1) 8.3.0

AHA, I remember now that I kludged up the xfs and iomap makefiles to
include the following, which turns on more warnings and debuginfo:

	ccflags-$(CONFIG_KASAN) += -Wno-error
	ccflags-y += -g \
	-Werror \
	-femit-struct-debug-detailed=any \
	-Wunused-but-set-variable \
	-Wuninitialized \
	-Wno-pointer-sign \
	-Wall \
	-Wextra \
	-Wno-unused-parameter \
	-fstack-usage \
	-Wno-sign-compare \
	-Wno-ignored-qualifiers \
	-Wno-error=unused-but-set-variable \
	-Wno-error=format=

	UBSAN_SANITIZE := y

At this point I suspect -Wall -Wextra cover a lot of these.

--D



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux