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_alloc.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_alloc.c')
-rw-r--r-- | fs/xfs/xfs_alloc.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c index 6fe5c02ba19a..af168faccc7a 100644 --- a/fs/xfs/xfs_alloc.c +++ b/fs/xfs/xfs_alloc.c | |||
@@ -683,8 +683,6 @@ xfs_alloc_ag_vextent_near( | |||
683 | xfs_agblock_t ltbno; /* start bno of left side entry */ | 683 | xfs_agblock_t ltbno; /* start bno of left side entry */ |
684 | xfs_agblock_t ltbnoa; /* aligned ... */ | 684 | xfs_agblock_t ltbnoa; /* aligned ... */ |
685 | xfs_extlen_t ltdiff; /* difference to left side entry */ | 685 | xfs_extlen_t ltdiff; /* difference to left side entry */ |
686 | /*REFERENCED*/ | ||
687 | xfs_agblock_t ltend; /* end bno of left side entry */ | ||
688 | xfs_extlen_t ltlen; /* length of left side entry */ | 686 | xfs_extlen_t ltlen; /* length of left side entry */ |
689 | xfs_extlen_t ltlena; /* aligned ... */ | 687 | xfs_extlen_t ltlena; /* aligned ... */ |
690 | xfs_agblock_t ltnew; /* useful start bno of left side */ | 688 | xfs_agblock_t ltnew; /* useful start bno of left side */ |
@@ -809,8 +807,7 @@ xfs_alloc_ag_vextent_near( | |||
809 | if ((error = xfs_alloc_get_rec(cnt_cur, <bno, <len, &i))) | 807 | if ((error = xfs_alloc_get_rec(cnt_cur, <bno, <len, &i))) |
810 | goto error0; | 808 | goto error0; |
811 | XFS_WANT_CORRUPTED_GOTO(i == 1, error0); | 809 | XFS_WANT_CORRUPTED_GOTO(i == 1, error0); |
812 | ltend = ltbno + ltlen; | 810 | ASSERT(ltbno + ltlen <= be32_to_cpu(XFS_BUF_TO_AGF(args->agbp)->agf_length)); |
813 | ASSERT(ltend <= be32_to_cpu(XFS_BUF_TO_AGF(args->agbp)->agf_length)); | ||
814 | args->len = blen; | 811 | args->len = blen; |
815 | if (!xfs_alloc_fix_minleft(args)) { | 812 | if (!xfs_alloc_fix_minleft(args)) { |
816 | xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); | 813 | xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); |
@@ -823,7 +820,7 @@ xfs_alloc_ag_vextent_near( | |||
823 | */ | 820 | */ |
824 | args->agbno = bnew; | 821 | args->agbno = bnew; |
825 | ASSERT(bnew >= ltbno); | 822 | ASSERT(bnew >= ltbno); |
826 | ASSERT(bnew + blen <= ltend); | 823 | ASSERT(bnew + blen <= ltbno + ltlen); |
827 | /* | 824 | /* |
828 | * Set up a cursor for the by-bno tree. | 825 | * Set up a cursor for the by-bno tree. |
829 | */ | 826 | */ |
@@ -1152,7 +1149,6 @@ xfs_alloc_ag_vextent_near( | |||
1152 | /* | 1149 | /* |
1153 | * Fix up the length and compute the useful address. | 1150 | * Fix up the length and compute the useful address. |
1154 | */ | 1151 | */ |
1155 | ltend = ltbno + ltlen; | ||
1156 | args->len = XFS_EXTLEN_MIN(ltlena, args->maxlen); | 1152 | args->len = XFS_EXTLEN_MIN(ltlena, args->maxlen); |
1157 | xfs_alloc_fix_len(args); | 1153 | xfs_alloc_fix_len(args); |
1158 | if (!xfs_alloc_fix_minleft(args)) { | 1154 | if (!xfs_alloc_fix_minleft(args)) { |
@@ -1165,7 +1161,7 @@ xfs_alloc_ag_vextent_near( | |||
1165 | (void)xfs_alloc_compute_diff(args->agbno, rlen, args->alignment, ltbno, | 1161 | (void)xfs_alloc_compute_diff(args->agbno, rlen, args->alignment, ltbno, |
1166 | ltlen, <new); | 1162 | ltlen, <new); |
1167 | ASSERT(ltnew >= ltbno); | 1163 | ASSERT(ltnew >= ltbno); |
1168 | ASSERT(ltnew + rlen <= ltend); | 1164 | ASSERT(ltnew + rlen <= ltbno + ltlen); |
1169 | ASSERT(ltnew + rlen <= be32_to_cpu(XFS_BUF_TO_AGF(args->agbp)->agf_length)); | 1165 | ASSERT(ltnew + rlen <= be32_to_cpu(XFS_BUF_TO_AGF(args->agbp)->agf_length)); |
1170 | args->agbno = ltnew; | 1166 | args->agbno = ltnew; |
1171 | if ((error = xfs_alloc_fixup_trees(cnt_cur, bno_cur_lt, ltbno, ltlen, | 1167 | if ((error = xfs_alloc_fixup_trees(cnt_cur, bno_cur_lt, ltbno, ltlen, |