Messages in this thread | | | From | Paul Moore <> | Date | Mon, 10 May 2021 21:49:24 -0400 | Subject | Re: [PATCH] selinux: Remove redundant assignment to rc |
| |
On Wed, Apr 28, 2021 at 6:00 AM Jiapeng Chong <jiapeng.chong@linux.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@linux.alibaba.com> > Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.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
| |