From: Brian Foster <bfoster@redhat.com>
To: linux-xfs@vger.kernel.org
Subject: [PATCH] xfs: fix unused variable warning in xfs_buf_item_unlock()
Date: Thu, 31 Aug 2017 12:04:58 -0400 [thread overview]
Message-ID: <20170831160458.24886-1-bfoster@redhat.com> (raw)
The ordered variable generates an unused warning on !DEBUG builds.
Separate the initialization of the associated variables from the
declarations to quiet gcc.
Signed-off-by: Brian Foster <bfoster@redhat.com>
---
fs/xfs/xfs_buf_item.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c
index ef2c137..f5d25f5 100644
--- a/fs/xfs/xfs_buf_item.c
+++ b/fs/xfs/xfs_buf_item.c
@@ -567,10 +567,15 @@ xfs_buf_item_unlock(
{
struct xfs_buf_log_item *bip = BUF_ITEM(lip);
struct xfs_buf *bp = bip->bli_buf;
- bool aborted = !!(lip->li_flags & XFS_LI_ABORTED);
- bool hold = !!(bip->bli_flags & XFS_BLI_HOLD);
- bool dirty = !!(bip->bli_flags & XFS_BLI_DIRTY);
- bool ordered = !!(bip->bli_flags & XFS_BLI_ORDERED);
+ bool aborted;
+ bool hold;
+ bool dirty;
+ bool ordered;
+
+ aborted = !!(lip->li_flags & XFS_LI_ABORTED);
+ hold = !!(bip->bli_flags & XFS_BLI_HOLD);
+ dirty = !!(bip->bli_flags & XFS_BLI_DIRTY);
+ ordered = !!(bip->bli_flags & XFS_BLI_ORDERED);
/* Clear the buffer's association with this transaction. */
bp->b_transp = NULL;
--
2.9.5
next reply other threads:[~2017-08-31 16:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-31 16:04 Brian Foster [this message]
2017-08-31 16:41 ` [PATCH] xfs: fix unused variable warning in xfs_buf_item_unlock() Darrick J. Wong
2017-08-31 21:52 ` Dave Chinner
2017-09-01 10:24 ` Brian Foster
2017-09-01 22:07 ` Dave Chinner
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=20170831160458.24886-1-bfoster@redhat.com \
--to=bfoster@redhat.com \
--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