summaryrefslogtreecommitdiff
path: root/disk-io.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 /disk-io.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 'disk-io.c')
-rw-r--r--disk-io.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/disk-io.c b/disk-io.c
index f4368f3d..90228556 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -123,7 +123,6 @@ int readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize,
u64 parent_transid)
{
int ret;
- int dev_nr;
struct extent_buffer *eb;
u64 length;
struct btrfs_multi_bio *multi = NULL;
@@ -135,7 +134,6 @@ int readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize,
return 0;
}
- dev_nr = 0;
length = blocksize;
ret = btrfs_map_block(&root->fs_info->mapping_tree, READ,
bytenr, &length, &multi, 0);
@@ -177,7 +175,6 @@ struct extent_buffer *read_tree_block(struct btrfs_root *root, u64 bytenr,
u32 blocksize, u64 parent_transid)
{
int ret;
- int dev_nr;
struct extent_buffer *eb;
u64 length;
struct btrfs_multi_bio *multi = NULL;
@@ -192,7 +189,6 @@ struct extent_buffer *read_tree_block(struct btrfs_root *root, u64 bytenr,
if (btrfs_buffer_uptodate(eb, parent_transid))
return eb;
- dev_nr = 0;
length = blocksize;
while (1) {
ret = btrfs_map_block(&root->fs_info->mapping_tree, READ,