Skip to content

Commit 7bf7a19

Browse files
committed
xfs: fix compiler warnings
Fix up all the compiler warnings that have crept in. Signed-off-by: Darrick J. Wong <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]>
1 parent d897246 commit 7bf7a19

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

fs/xfs/libxfs/xfs_bmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ xfs_bmap_validate_ret(
579579

580580
#else
581581
#define xfs_bmap_check_leaf_extents(cur, ip, whichfork) do { } while (0)
582-
#define xfs_bmap_validate_ret(bno,len,flags,mval,onmap,nmap)
582+
#define xfs_bmap_validate_ret(bno,len,flags,mval,onmap,nmap) do { } while (0)
583583
#endif /* DEBUG */
584584

585585
/*

fs/xfs/libxfs/xfs_inode_fork.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,14 +1499,11 @@ xfs_iext_realloc_indirect(
14991499
xfs_ifork_t *ifp, /* inode fork pointer */
15001500
int new_size) /* new indirection array size */
15011501
{
1502-
int nlists; /* number of irec's (ex lists) */
1503-
int size; /* current indirection array size */
1504-
15051502
ASSERT(ifp->if_flags & XFS_IFEXTIREC);
1506-
nlists = ifp->if_real_bytes / XFS_IEXT_BUFSZ;
1507-
size = nlists * sizeof(xfs_ext_irec_t);
15081503
ASSERT(ifp->if_real_bytes);
1509-
ASSERT((new_size >= 0) && (new_size != size));
1504+
ASSERT((new_size >= 0) &&
1505+
(new_size != ((ifp->if_real_bytes / XFS_IEXT_BUFSZ) *
1506+
sizeof(xfs_ext_irec_t))));
15101507
if (new_size == 0) {
15111508
xfs_iext_destroy(ifp);
15121509
} else {

fs/xfs/xfs_buf_item.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,9 @@ xfs_buf_item_unlock(
570570
bool aborted = !!(lip->li_flags & XFS_LI_ABORTED);
571571
bool hold = !!(bip->bli_flags & XFS_BLI_HOLD);
572572
bool dirty = !!(bip->bli_flags & XFS_BLI_DIRTY);
573+
#if defined(DEBUG) || defined(XFS_WARN)
573574
bool ordered = !!(bip->bli_flags & XFS_BLI_ORDERED);
575+
#endif
574576

575577
/* Clear the buffer's association with this transaction. */
576578
bp->b_transp = NULL;

fs/xfs/xfs_iops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ xfs_vn_setattr_nonsize(
817817
* Caution: The caller of this function is responsible for calling
818818
* setattr_prepare() or otherwise verifying the change is fine.
819819
*/
820-
int
820+
STATIC int
821821
xfs_setattr_size(
822822
struct xfs_inode *ip,
823823
struct iattr *iattr)

fs/xfs/xfs_log_recover.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4827,12 +4827,16 @@ xlog_recover_process_intents(
48274827
int error = 0;
48284828
struct xfs_ail_cursor cur;
48294829
struct xfs_ail *ailp;
4830+
#if defined(DEBUG) || defined(XFS_WARN)
48304831
xfs_lsn_t last_lsn;
4832+
#endif
48314833

48324834
ailp = log->l_ailp;
48334835
spin_lock(&ailp->xa_lock);
48344836
lip = xfs_trans_ail_cursor_first(ailp, &cur, 0);
4837+
#if defined(DEBUG) || defined(XFS_WARN)
48354838
last_lsn = xlog_assign_lsn(log->l_curr_cycle, log->l_curr_block);
4839+
#endif
48364840
while (lip != NULL) {
48374841
/*
48384842
* We're done when we see something other than an intent.

0 commit comments

Comments
 (0)