public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: devirtualize ->m_dirnameops
Date: Wed, 13 Nov 2019 08:27:06 -0800	[thread overview]
Message-ID: <20191113162706.GV6219@magnolia> (raw)
In-Reply-To: <20191113065918.GA2606@lst.de>

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

      reply	other threads:[~2019-11-13 16:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11 18:04 [PATCH] xfs: devirtualize ->m_dirnameops Christoph Hellwig
2019-11-11 18:10 ` Christoph Hellwig
2019-11-13  4:22 ` Darrick J. Wong
2019-11-13  6:59   ` Christoph Hellwig
2019-11-13 16:27     ` Darrick J. Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191113162706.GV6219@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=hch@lst.de \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox