diff options
author | Chris Ball <cjb@laptop.org> | 2011-03-07 10:05:21 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-10-25 09:18:32 -0400 |
commit | fcdc0929c6ea051dad59818210df53fd03eaf4b1 (patch) | |
tree | d2adab24e3a8f10db07ee82b1bdd3db4fc77ca67 /extent_io.c | |
parent | 29e6fc2aa637956ae57c5bf70208dea12e5b78cb (diff) |
Fix unused-but-set errors in gcc-4.6
gcc-4.6 (as shipped in Fedora) turns on -Wunused-but-set-variable by
default, which breaks the build when combined with -Wall, e.g.:
debug-tree.c: In function ‘print_extent_leaf’:
debug-tree.c:45:13: error: variable ‘last_len’ set but not used [-Werror=unused-but-set-variable]
debug-tree.c:44:13: error: variable ‘last’ set but not used [-Werror=unused-but-set-variable]
debug-tree.c:41:21: error: variable ‘item’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
This patch fixes the errors by removing the unused variables.
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
Diffstat (limited to 'extent_io.c')
-rw-r--r-- | extent_io.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/extent_io.c b/extent_io.c index 069c199c..70fecbbf 100644 --- a/extent_io.c +++ b/extent_io.c @@ -296,7 +296,6 @@ int set_extent_bits(struct extent_io_tree *tree, u64 start, struct extent_state *prealloc = NULL; struct cache_extent *node; int err = 0; - int set; u64 last_start; u64 last_end; again: @@ -327,7 +326,6 @@ again: * Just lock what we found and keep going */ if (state->start == start && state->end <= end) { - set = state->state & bits; state->state |= bits; merge_state(tree, state); if (last_end == (u64)-1) @@ -352,7 +350,6 @@ again: * desired bit on it. */ if (state->start < start) { - set = state->state & bits; err = split_state(tree, state, prealloc, start); BUG_ON(err == -EEXIST); prealloc = NULL; @@ -398,7 +395,6 @@ again: * We need to split the extent, and set the bit * on the first half */ - set = state->state & bits; err = split_state(tree, state, prealloc, end + 1); BUG_ON(err == -EEXIST); |