[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] attr: eliminate a dead store in attr_copy_action()
From: |
Andreas Grünbacher |
Subject: |
Re: [PATCH] attr: eliminate a dead store in attr_copy_action() |
Date: |
Mon, 19 Apr 2021 15:19:21 +0200 |
Hi Kamil,
Am Mo., 19. Apr. 2021 um 15:11 Uhr schrieb Kamil Dudka <kdudka@redhat.com>:
> ... 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.30.2
ok, applied.
Thanks,
Andreas