Re: [PATCH] sysctl: Remove redundant assignment to first

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 07, 2021 at 06:15:54PM +0800, Jiapeng Chong wrote:
> Variable first is set to '0', but this value is never read as it is
> not used later on, hence it is a redundant assignment and can be
> removed.
> 
> Clean up the following clang-analyzer warning:
> 
> kernel/sysctl.c:1562:4: warning: Value stored to 'first' is never read
> [clang-analyzer-deadcode.DeadStores].

While this is true, it is incomplete.  The 'first' declaration should be
moved into the 'else' arm of the 'if (write)' conditional.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux