[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHC9VhSxDoxnKrw+bZQ18YVMm56ajza4wzFv=3L3SZf7qd5QgA@mail.gmail.com>
Date: Mon, 10 May 2021 21:49:24 -0400
From: Paul Moore <paul@...l-moore.com>
To: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Cc: Stephen Smalley <stephen.smalley.work@...il.com>,
Eric Paris <eparis@...isplace.org>, selinux@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] selinux: Remove redundant assignment to rc
On Wed, Apr 28, 2021 at 6:00 AM Jiapeng Chong
<jiapeng.chong@...ux.alibaba.com> wrote:
>
> Variable rc is set to '-EINVAL' but this value is never read as
> it is overwritten or not used later on, hence it is a redundant
> assignment and can be removed.
>
> Cleans up the following clang-analyzer warning:
>
> security/selinux/ss/services.c:2103:3: warning: Value stored to 'rc' is
> never read [clang-analyzer-deadcode.DeadStores].
>
> security/selinux/ss/services.c:2079:2: warning: Value stored to 'rc' is
> never read [clang-analyzer-deadcode.DeadStores].
>
> security/selinux/ss/services.c:2071:2: warning: Value stored to 'rc' is
> never read [clang-analyzer-deadcode.DeadStores].
>
> security/selinux/ss/services.c:2062:2: warning: Value stored to 'rc' is
> never read [clang-analyzer-deadcode.DeadStores].
>
> security/selinux/ss/policydb.c:2592:3: warning: Value stored to 'rc' is
> never read [clang-analyzer-deadcode.DeadStores].
>
> Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
> ---
> security/selinux/ss/policydb.c | 1 -
> security/selinux/ss/services.c | 4 ----
> 2 files changed, 5 deletions(-)
Merged into selinux/next, thanks.
--
paul moore
www.paul-moore.com
Powered by blists - more mailing lists