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 /mkfs.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 'mkfs.c')
-rw-r--r-- | mkfs.c | 3 |
1 files changed, 0 insertions, 3 deletions
@@ -1149,7 +1149,6 @@ int main(int ac, char **av) int zero_end = 1; int option_index = 0; int fd; - int first_fd; int ret; int i; int mixed = 0; @@ -1250,7 +1249,6 @@ int main(int ac, char **av) fprintf(stderr, "unable to open %s\n", file); exit(1); } - first_fd = fd; first_file = file; ret = btrfs_prepare_device(fd, file, zero_end, &dev_block_count, &mixed); if (block_count == 0) @@ -1264,7 +1262,6 @@ int main(int ac, char **av) } file = output; - first_fd = fd; first_file = file; block_count = size_sourcedir(source_dir, sectorsize, &num_of_meta_chunks, &size_of_data); |