path: root/dir-item.c
diff options
authorChris Ball <>2011-03-07 10:05:21 -0500
committerChris Mason <>2011-10-25 09:18:32 -0400
commitfcdc0929c6ea051dad59818210df53fd03eaf4b1 (patch)
treed2adab24e3a8f10db07ee82b1bdd3db4fc77ca67 /dir-item.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 <> Signed-off-by: Hugo Mills <>
Diffstat (limited to 'dir-item.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/dir-item.c b/dir-item.c
index 71373b8b..f00485a1 100644
--- a/dir-item.c
+++ b/dir-item.c
@@ -332,5 +332,5 @@ int btrfs_delete_one_dir_name(struct btrfs_trans_handle *trans,
ret = btrfs_truncate_item(trans, root, path,
item_len - sub_item_len, 1);
- return 0;
+ return ret;