| To: | Eric Sandeen <sandeen@xxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] xfs: remove unused variable warning in xfs_finish_page_writeback |
| From: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
| Date: | Thu, 12 May 2016 04:58:11 -0700 |
| Cc: | xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <17ff69fb-360c-8c44-9431-564dcd54aef9@xxxxxxxxxxx> |
| References: | <1462983266-15235-1-git-send-email-cmaiolino@xxxxxxxxxx> <17ff69fb-360c-8c44-9431-564dcd54aef9@xxxxxxxxxxx> |
| User-agent: | Mutt/1.5.24 (2015-08-30) |
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? :) |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH v5 1/2] libxcmd: generalize topology functions, Christoph Hellwig |
|---|---|
| Next by Date: | Re: [PATCH v5 1/2] libxcmd: generalize topology functions, Bill O'Donnell |
| Previous by Thread: | Re: [PATCH] xfs: remove unused variable warning in xfs_finish_page_writeback, Carlos Maiolino |
| Next by Thread: | 4.6-rc7 xfs circular locking dependency, Bart Van Assche |
| Indexes: | [Date] [Thread] [Top] [All Lists] |