summaryrefslogtreecommitdiff
path: root/mkfs.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 /mkfs.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 'mkfs.c')
-rw-r--r--mkfs.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/mkfs.c b/mkfs.c
index 57c88f92..171710e5 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -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);