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] [thread-next>] [day] [month] [year] [list]
Message-ID: <caf97bb9-78b2-1656-fb7d-96cb783e5662@infradead.org>
Date:   Wed, 6 Apr 2022 17:11:56 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     "Chen, Rong A" <rong.a.chen@...el.com>,
        kernel test robot <lkp@...el.com>,
        Ben Widawsky <ben.widawsky@...el.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Dan Williams <dan.j.williams@...el.com>,
        Jonathan Cameron <Jonathan.Cameron@...wei.com>
Subject: Re: [kbuild-all] Re: drivers/cxl/pci.c:439:7: warning: Local variable
 'rc' shadows outer variable [shadowVariable]



On 4/6/22 04:17, Chen, Rong A wrote:
> 
> 
> On 4/4/2022 3:29 AM, Randy Dunlap wrote:
>> Hi lkp/ktr,
>>
>> On 4/2/22 04:26, kernel test robot wrote:
>>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>>> head:   88e6c0207623874922712e162e25d9dafd39661e
>>> commit: 523e594d9cc03db962c741ce02c8a58aab58a123 cxl/pci: Implement wait for media active
>>> date:   7 weeks ago
>>> compiler: alpha-linux-gcc (GCC) 11.2.0
>>>
>>> If you fix the issue, kindly add following tag as appropriate
>>> Reported-by: kernel test robot <lkp@...el.com>
>>>
>>>
>>> cppcheck warnings: (new ones prefixed by >>)
>>>>> drivers/cxl/pci.c:439:7: warning: Local variable 'rc' shadows outer variable [shadowVariable]
>>>       int rc;
>>>           ^
>>>     drivers/cxl/pci.c:431:6: note: Shadowed declaration
>>>      int rc, i;
>>>          ^
>>>     drivers/cxl/pci.c:439:7: note: Shadow variable
>>>       int rc;
>>>           ^
>>>
>>> cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>>>
>>>>> drivers/cxl/port.c:63:1: warning: There is an unknown macro here somewhere. Configuration is required. If __stringify is a macro then please configure it. [unknownMacro]
>>>     MODULE_ALIAS_CXL(CXL_DEVICE_PORT);
>>>     ^
>>> -- 
>>
>> Can you provide a cppcheck config file and command line
>> for this, please?
> 
> Hi Randy,
> 
> The below command can show the warning:
> $ cppcheck --quiet --enable=style,performance,portability --template=gcc drivers/cxl/port.c
> drivers/cxl/port.c:63:1: warning: There is an unknown macro here somewhere. Configuration is required. If __stringify is a macro then please configure it. [unknownMacro]
> MODULE_ALIAS_CXL(CXL_DEVICE_PORT);
> ^

Hm, that still shows me nothing. There must be something else.
Maybe it's version-related?  I have:

$ cppcheck --version
Cppcheck 1.82

> 
> Best Regards,
> Rong Chen
> 
>>
>> My naive testing does not see any of these warnings --
>> although I can easily spot the problems in the source file.
>>
>> thanks.

thanks.

-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ