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
| ||
|
Date: Wed, 5 Jan 2022 23:07:58 +0800 From: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com> To: clm@...com Cc: josef@...icpanda.com, dsterba@...e.com, linux-btrfs@...r.kernel.org, linux-kernel@...r.kernel.org, chongjiapeng <jiapeng.chong@...ux.alibaba.com>, Abaci Robot <abaci@...ux.alibaba.com> Subject: [PATCH v2] btrfs: Remove redundant assignment of slot and leaf From: chongjiapeng <jiapeng.chong@...ux.alibaba.com> slot and leaf are being initialized to path->slots[0] and path->nodes[0], but this is never read as slot and leaf is overwritten later on. Remove the redundant assignment. Cleans up the following clang-analyzer warning: fs/btrfs/tree-log.c:6125:7: warning: Value stored to 'slot' during its initialization is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot <abaci@...ux.alibaba.com> Signed-off-by: chongjiapeng <jiapeng.chong@...ux.alibaba.com> --- Changes in v2: -Remove redundant assignment of leaf. fs/btrfs/tree-log.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 4b89ac769347..d99cda0acd95 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -6188,8 +6188,6 @@ static int log_new_ancestors(struct btrfs_trans_handle *trans, if (ret < 0) return ret; - leaf = path->nodes[0]; - slot = path->slots[0]; if (slot >= btrfs_header_nritems(leaf)) { ret = btrfs_next_leaf(root, path); if (ret < 0) -- 2.19.1.6.gb485710b
Powered by blists - more mailing lists