summaryrefslogtreecommitdiff
path: root/btrfsck.c
diff options
context:
space:
mode:
authorChris Ball <cjb@laptop.org>2011-03-07 10:05:21 -0500
committerChris Mason <chris.mason@oracle.com>2011-10-25 09:18:32 -0400
commitfcdc0929c6ea051dad59818210df53fd03eaf4b1 (patch)
treed2adab24e3a8f10db07ee82b1bdd3db4fc77ca67 /btrfsck.c
parent29e6fc2aa637956ae57c5bf70208dea12e5b78cb (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 'btrfsck.c')
-rw-r--r--btrfsck.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/btrfsck.c b/btrfsck.c
index 63e44d1d..e3cd4354 100644
--- a/btrfsck.c
+++ b/btrfsck.c
@@ -1037,7 +1037,7 @@ static int process_one_leaf(struct btrfs_root *root, struct extent_buffer *eb,
break;
};
}
- return 0;
+ return ret;
}
static void reada_walk_down(struct btrfs_root *root,
@@ -1917,7 +1917,6 @@ static int check_owner_ref(struct btrfs_root *root,
struct btrfs_root *ref_root;
struct btrfs_key key;
struct btrfs_path path;
- int ret;
int level;
int found = 0;
@@ -1950,7 +1949,7 @@ static int check_owner_ref(struct btrfs_root *root,
btrfs_init_path(&path);
path.lowest_level = level + 1;
- ret = btrfs_search_slot(NULL, ref_root, &key, &path, 0, 0);
+ btrfs_search_slot(NULL, ref_root, &key, &path, 0, 0);
if (buf->start == btrfs_node_blockptr(path.nodes[level + 1],
path.slots[level + 1]))
@@ -2539,16 +2538,6 @@ static int run_next_block(struct btrfs_root *root,
continue;
}
if (key.type == BTRFS_BLOCK_GROUP_ITEM_KEY) {
- struct btrfs_block_group_item *bi;
- bi = btrfs_item_ptr(buf, i,
- struct btrfs_block_group_item);
-#if 0
- fprintf(stderr,"block group %Lu %Lu used %Lu ",
- btrfs_disk_key_objectid(disk_key),
- btrfs_disk_key_offset(disk_key),
- btrfs_block_group_used(bi));
- fprintf(stderr, "flags %x\n", bi->flags);
-#endif
continue;
}
if (key.type == BTRFS_EXTENT_REF_V0_KEY) {