lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200219112148.16914-1-yukuai3@huawei.com>
Date:   Wed, 19 Feb 2020 19:21:48 +0800
From:   yu kuai <yukuai3@...wei.com>
To:     <clm@...com>, <josef@...icpanda.com>, <dsterba@...e.com>
CC:     <linux-btrfs@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <yukuai3@...wei.com>, <zhengbin13@...wei.com>,
        <yi.zhang@...wei.com>
Subject: [PATCH 1/3] btrfs: remove set but not used variable 'root_owner'

Fixes gcc '-Wunused-but-set-variable' warning:

fs/btrfs/tree-log.c: In function ‘walk_down_log_tree’:
fs/btrfs/tree-log.c:2698:6: warning: variable ‘root_owner’
set but not used [-Wunused-but-set-variable]
fs/btrfs/tree-log.c: In function ‘walk_up_log_tree’:
fs/btrfs/tree-log.c:2793:6: warning: variable ‘root_owner’
set but not used [-Wunused-but-set-variable]

They are never used, and so can be removed.

Signed-off-by: yu kuai <yukuai3@...wei.com>
---
 fs/btrfs/tree-log.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 5e6b18924e00..156beda01b18 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -2695,7 +2695,6 @@ static noinline int walk_down_log_tree(struct btrfs_trans_handle *trans,
 				   struct walk_control *wc)
 {
 	struct btrfs_fs_info *fs_info = root->fs_info;
-	u64 root_owner;
 	u64 bytenr;
 	u64 ptr_gen;
 	struct extent_buffer *next;
@@ -2721,7 +2720,6 @@ static noinline int walk_down_log_tree(struct btrfs_trans_handle *trans,
 		blocksize = fs_info->nodesize;
 
 		parent = path->nodes[*level];
-		root_owner = btrfs_header_owner(parent);
 
 		next = btrfs_find_create_tree_block(fs_info, bytenr);
 		if (IS_ERR(next))
@@ -2790,7 +2788,6 @@ static noinline int walk_up_log_tree(struct btrfs_trans_handle *trans,
 				 struct walk_control *wc)
 {
 	struct btrfs_fs_info *fs_info = root->fs_info;
-	u64 root_owner;
 	int i;
 	int slot;
 	int ret;
@@ -2809,7 +2806,6 @@ static noinline int walk_up_log_tree(struct btrfs_trans_handle *trans,
 			else
 				parent = path->nodes[*level + 1];
 
-			root_owner = btrfs_header_owner(parent);
 			ret = wc->process_func(root, path->nodes[*level], wc,
 				 btrfs_header_generation(path->nodes[*level]),
 				 *level);
-- 
2.17.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ