All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs: fix unused variable warning in xfs_buf_item_unlock()
@ 2017-08-31 16:04 Brian Foster
  2017-08-31 16:41 ` Darrick J. Wong
  0 siblings, 1 reply; 5+ messages in thread
From: Brian Foster @ 2017-08-31 16:04 UTC (permalink / raw)
  To: linux-xfs

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-09-01 22:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-31 16:04 [PATCH] xfs: fix unused variable warning in xfs_buf_item_unlock() Brian Foster
2017-08-31 16:41 ` Darrick J. Wong
2017-08-31 21:52   ` Dave Chinner
2017-09-01 10:24     ` Brian Foster
2017-09-01 22:07       ` Dave Chinner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.