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 /print-tree.c | |
parent | 29e6fc2aa637956ae57c5bf70208dea12e5b78cb (diff) | |
download | btrfs-progs-fcdc0929c6ea051dad59818210df53fd03eaf4b1.tar.gz |
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 'print-tree.c')
-rw-r--r-- | print-tree.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/print-tree.c b/print-tree.c index ac575d5..ddcade1 100644 --- a/print-tree.c +++ b/print-tree.c @@ -444,7 +444,6 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l) struct btrfs_dir_item *di; struct btrfs_inode_item *ii; struct btrfs_file_extent_item *fi; - struct btrfs_csum_item *ci; struct btrfs_block_group_item *bi; struct btrfs_extent_data_ref *dref; struct btrfs_shared_data_ref *sref; @@ -556,11 +555,9 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l) #endif break; case BTRFS_CSUM_ITEM_KEY: - ci = btrfs_item_ptr(l, i, struct btrfs_csum_item); printf("\t\tcsum item\n"); break; case BTRFS_EXTENT_CSUM_KEY: - ci = btrfs_item_ptr(l, i, struct btrfs_csum_item); printf("\t\textent csum item\n"); break; case BTRFS_EXTENT_DATA_KEY: |