7 Star 0 Fork 27

src-openEuler/attr

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0003-attr-eliminate-a-dead-store-in-attr_copy_action.patch 983 Bytes
一键复制 编辑 原始数据 按行查看 历史
From 8d7fa4cc89713e3e98afeec7cc6f1002855d4ac3 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Mon, 19 Apr 2021 15:10:48 +0200
Subject: [PATCH] attr: eliminate a dead store in attr_copy_action()
... reported by clang:
libattr/attr_copy_action.c:158:22: warning[deadcode.DeadStores]: Value stored to 'action' during its initialization is never read
---
libattr/attr_copy_action.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libattr/attr_copy_action.c b/libattr/attr_copy_action.c
index 279f2df..d41dd2e 100644
--- a/libattr/attr_copy_action.c
+++ b/libattr/attr_copy_action.c
@@ -155,9 +155,8 @@ fail:
int
attr_copy_action(const char *name, struct error_context *ctx)
{
- struct attr_action *action = attr_actions;
-
if (!attr_parse_attr_conf(ctx)) {
+ struct attr_action *action;
for (action = attr_actions; action; action = action->next) {
if (!fnmatch(action->pattern, name, 0))
return action->action;
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/attr.git
git@gitee.com:src-openeuler/attr.git
src-openeuler
attr
attr
master

搜索帮助