diff options
author | Christoph Hellwig <hch@infradead.org> | 2010-07-20 03:54:45 -0400 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2010-07-26 14:16:51 -0400 |
commit | 73523a2ecf03f0bfe7c36c244aff8a2ef2208a4a (patch) | |
tree | b6b1f2be9a4b276a41381a51fc7278bf7e365471 /fs/xfs/xfs_inode_item.c | |
parent | 0f1a932f5d4d6ee71afb141914e2d5f11f27eee1 (diff) |
xfs: fix gcc 4.6 set but not read and unused statement warnings
[hch: dropped a few hunks that need structural changes instead]
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_inode_item.c')
-rw-r--r-- | fs/xfs/xfs_inode_item.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c index 065c1ad9b708..2d6fcfdc7834 100644 --- a/fs/xfs/xfs_inode_item.c +++ b/fs/xfs/xfs_inode_item.c | |||
@@ -214,7 +214,6 @@ xfs_inode_item_format( | |||
214 | uint nvecs; | 214 | uint nvecs; |
215 | size_t data_bytes; | 215 | size_t data_bytes; |
216 | xfs_bmbt_rec_t *ext_buffer; | 216 | xfs_bmbt_rec_t *ext_buffer; |
217 | int nrecs; | ||
218 | xfs_mount_t *mp; | 217 | xfs_mount_t *mp; |
219 | 218 | ||
220 | vecp->i_addr = &iip->ili_format; | 219 | vecp->i_addr = &iip->ili_format; |
@@ -314,9 +313,8 @@ xfs_inode_item_format( | |||
314 | ASSERT(ip->i_df.if_u1.if_extents != NULL); | 313 | ASSERT(ip->i_df.if_u1.if_extents != NULL); |
315 | ASSERT(ip->i_d.di_nextents > 0); | 314 | ASSERT(ip->i_d.di_nextents > 0); |
316 | ASSERT(iip->ili_extents_buf == NULL); | 315 | ASSERT(iip->ili_extents_buf == NULL); |
317 | nrecs = ip->i_df.if_bytes / | 316 | ASSERT((ip->i_df.if_bytes / |
318 | (uint)sizeof(xfs_bmbt_rec_t); | 317 | (uint)sizeof(xfs_bmbt_rec_t)) > 0); |
319 | ASSERT(nrecs > 0); | ||
320 | #ifdef XFS_NATIVE_HOST | 318 | #ifdef XFS_NATIVE_HOST |
321 | if (nrecs == ip->i_d.di_nextents) { | 319 | if (nrecs == ip->i_d.di_nextents) { |
322 | /* | 320 | /* |
@@ -439,15 +437,15 @@ xfs_inode_item_format( | |||
439 | ASSERT(!(iip->ili_format.ilf_fields & | 437 | ASSERT(!(iip->ili_format.ilf_fields & |
440 | (XFS_ILOG_ADATA | XFS_ILOG_ABROOT))); | 438 | (XFS_ILOG_ADATA | XFS_ILOG_ABROOT))); |
441 | if (iip->ili_format.ilf_fields & XFS_ILOG_AEXT) { | 439 | if (iip->ili_format.ilf_fields & XFS_ILOG_AEXT) { |
442 | ASSERT(ip->i_afp->if_bytes > 0); | ||
443 | ASSERT(ip->i_afp->if_u1.if_extents != NULL); | ||
444 | ASSERT(ip->i_d.di_anextents > 0); | ||
445 | #ifdef DEBUG | 440 | #ifdef DEBUG |
446 | nrecs = ip->i_afp->if_bytes / | 441 | int nrecs = ip->i_afp->if_bytes / |
447 | (uint)sizeof(xfs_bmbt_rec_t); | 442 | (uint)sizeof(xfs_bmbt_rec_t); |
448 | #endif | ||
449 | ASSERT(nrecs > 0); | 443 | ASSERT(nrecs > 0); |
450 | ASSERT(nrecs == ip->i_d.di_anextents); | 444 | ASSERT(nrecs == ip->i_d.di_anextents); |
445 | ASSERT(ip->i_afp->if_bytes > 0); | ||
446 | ASSERT(ip->i_afp->if_u1.if_extents != NULL); | ||
447 | ASSERT(ip->i_d.di_anextents > 0); | ||
448 | #endif | ||
451 | #ifdef XFS_NATIVE_HOST | 449 | #ifdef XFS_NATIVE_HOST |
452 | /* | 450 | /* |
453 | * There are not delayed allocation extents | 451 | * There are not delayed allocation extents |
@@ -889,10 +887,8 @@ xfs_iflush_abort( | |||
889 | xfs_inode_t *ip) | 887 | xfs_inode_t *ip) |
890 | { | 888 | { |
891 | xfs_inode_log_item_t *iip = ip->i_itemp; | 889 | xfs_inode_log_item_t *iip = ip->i_itemp; |
892 | xfs_mount_t *mp; | ||
893 | 890 | ||
894 | iip = ip->i_itemp; | 891 | iip = ip->i_itemp; |
895 | mp = ip->i_mount; | ||
896 | if (iip) { | 892 | if (iip) { |
897 | struct xfs_ail *ailp = iip->ili_item.li_ailp; | 893 | struct xfs_ail *ailp = iip->ili_item.li_ailp; |
898 | if (iip->ili_item.li_flags & XFS_LI_IN_AIL) { | 894 | if (iip->ili_item.li_flags & XFS_LI_IN_AIL) { |