[PATCH] xfs: remove unused variable warning in xfs_finish_page_writeback

Christoph Hellwig hch at infradead.org
Thu May 12 06:58:11 CDT 2016


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? :)



More information about the xfs mailing list