!37 [sync] PR-35: fix compile warning
From: @openeuler-sync-bot Reviewed-by: @liuzhiqiang26 Signed-off-by: @liuzhiqiang26
This commit is contained in:
commit
4899b08577
30
0003-attr-eliminate-a-dead-store-in-attr_copy_action.patch
Normal file
30
0003-attr-eliminate-a-dead-store-in-attr_copy_action.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
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
|
||||||
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
%{!?_licensedir:%global license %%doc}
|
%{!?_licensedir:%global license %%doc}
|
||||||
Name: attr
|
Name: attr
|
||||||
Version: 2.5.1
|
Version: 2.5.1
|
||||||
Release: 2
|
Release: 3
|
||||||
Summary: Commands for Manipulating Filesystem Extended Attributes
|
Summary: Commands for Manipulating Filesystem Extended Attributes
|
||||||
License: GPLv2+ AND LGPLv2+
|
License: GPLv2+ AND LGPLv2+
|
||||||
URL: https://savannah.nongnu.org/projects/attr
|
URL: https://savannah.nongnu.org/projects/attr
|
||||||
@ -10,6 +10,7 @@ Source0: https://download-mirror.savannah.gnu.org/releases/attr/attr-%{version}.
|
|||||||
# fix test-suite failure with perl-5.26.0 (#1473853)
|
# fix test-suite failure with perl-5.26.0 (#1473853)
|
||||||
Patch1: 0001-bypass-wrong-output-when-enabled-selinux.patch
|
Patch1: 0001-bypass-wrong-output-when-enabled-selinux.patch
|
||||||
Patch2: 0002-dont-skip-security.evm-when-copy-xattr.patch
|
Patch2: 0002-dont-skip-security.evm-when-copy-xattr.patch
|
||||||
|
Patch3: 0003-attr-eliminate-a-dead-store-in-attr_copy_action.patch
|
||||||
|
|
||||||
BuildRequires: gettext, libtool, chrpath, gcc,
|
BuildRequires: gettext, libtool, chrpath, gcc,
|
||||||
Provides: libattr
|
Provides: libattr
|
||||||
@ -96,6 +97,9 @@ fi
|
|||||||
%{_mandir}/man3/*
|
%{_mandir}/man3/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Oct 29 2022 wangzhiqiang <wangzhiqiang95@huawei.com> - 2.5.1-3
|
||||||
|
- fix compile warning
|
||||||
|
|
||||||
* Mon Jan 24 2022 volcanodragon <linfeilong@huawei.com> - 2.5.1-2
|
* Mon Jan 24 2022 volcanodragon <linfeilong@huawei.com> - 2.5.1-2
|
||||||
- dont skip security.evm copy for ima
|
- dont skip security.evm copy for ima
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user