lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 22 Jun 2022 10:37:36 +0800
From:   "Chen, Rong A" <rong.a.chen@...el.com>
To:     Michal Hocko <mhocko@...e.com>,
        Julia Lawall <julia.lawall@...ia.fr>
Cc:     Charan Teja Kalla <quic_charante@...cinc.com>,
        kernel test robot <lkp@...el.com>,
        Minchan Kim <minchan@...nel.org>, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linux Memory Management List <linux-mm@...ck.org>
Subject: Re: [kbuild-all] Re: mm/madvise.c:1438:6: warning: Redundant
 assignment of 'ret' to itself. [selfAssignment]



On 6/21/2022 3:14 AM, Michal Hocko wrote:
> On Mon 20-06-22 12:54:56, Julia Lawall wrote:
>>
>>
>> On Mon, 20 Jun 2022, Michal Hocko wrote:
>>
>>> On Sat 18-06-22 11:25:43, Charan Teja Kalla wrote:
>>>> Hello Andrew,
>>>>
[...]
>>>>> cppcheck warnings: (new ones prefixed by >>)
>>>>>>> mm/madvise.c:1438:6: warning: Redundant assignment of 'ret' to itself. [selfAssignment]
>>>>>      ret = (total_len - iov_iter_count(&iter)) ? : ret;
>>>>
>>>> Other way to avoid this warning is by creating another local variable
>>>> that holds the total bytes processed. Having another local variable to
>>>> get rid off some compilation warning doesn't seem proper to me. So,
>>>> leaving this warning unless you ask me to fix this.
>>>
>>> Is this a new warning? I do not see it supported by my gcc 10.x. Do we
>>
>> cppcheck is a static analysis tool.  It looks like it doesn't have a
>> proper understanding of ?:
> 
> Ohh, thanks for the clarification! I thought this was a gcc feature.
> Then I would suggest to report a bug report against the static checker
> rather than making any changes to the kernel to workaround it.
> 

Hi all,

Sorry for the inconvenience, we have added the warning to ignore list
to avoid reporting it again.

Best Regards,
Rong Chen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ