From: Christoph Hellwig <hch@infradead.org>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: remove unused variable warning in xfs_finish_page_writeback
Date: Thu, 12 May 2016 04:58:11 -0700 [thread overview]
Message-ID: <20160512115811.GE32528@infradead.org> (raw)
In-Reply-To: <17ff69fb-360c-8c44-9431-564dcd54aef9@sandeen.net>
On Wed, May 11, 2016 at 11:33:21AM -0500, Eric Sandeen wrote:
> Oh, I see. It's unused on non-debug builds because it's only used
> under ASSERT.
>
> Ok, that's a good way to fix it, although there are some scanners
> out there (clang? some gcc? I don't recall) which will also flag
> write-only variables. It'd be ugly but sometimes I wonder if an
> ASSERT_DECL() macro would make some sense.
>
> Or a MASK() macro so we could just do:
>
> #define MASK(nbits) ((1UL << (nbits)) - 1) /* mask with NBITS bits set */
aka xfs_mask32lo from xfs_bit.h? :)
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2016-05-12 11:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-11 16:14 [PATCH] xfs: remove unused variable warning in xfs_finish_page_writeback Carlos Maiolino
2016-05-11 16:33 ` Eric Sandeen
2016-05-12 8:34 ` Carlos Maiolino
2016-05-12 11:58 ` Christoph Hellwig [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=20160512115811.GE32528@infradead.org \
--to=hch@infradead.org \
--cc=sandeen@sandeen.net \
--cc=xfs@oss.sgi.com \
/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