Fix unused-but-set errors in gcc-4.6
authorChris Ball <cjb@laptop.org>
Mon, 7 Mar 2011 15:05:21 +0000 (10:05 -0500)
committerChris Mason <chris.mason@oracle.com>
Tue, 25 Oct 2011 13:18:32 +0000 (09:18 -0400)
commitfcdc0929c6ea051dad59818210df53fd03eaf4b1
treed2adab24e3a8f10db07ee82b1bdd3db4fc77ca67
parent29e6fc2aa637956ae57c5bf70208dea12e5b78cb
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>
12 files changed:
btrfs-map-logical.c
btrfsck.c
ctree.c
debug-tree.c
dir-item.c
disk-io.c
extent-cache.c
extent-tree.c
extent_io.c
mkfs.c
print-tree.c
volumes.c