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]
Date:	Tue, 23 Sep 2014 16:29:37 +0000
From:	"Rustad, Mark D" <mark.d.rustad@...el.com>
To:	Josh Triplett <josh@...htriplett.org>
CC:	Borislav Petkov <bp@...en8.de>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>,
	"sparse@...isli.org" <sparse@...isli.org>,
	"linux-sparse@...r.kernel.org" <linux-sparse@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 0/7] Silence even more W=2 warnings

On Sep 23, 2014, at 7:49 AM, Josh Triplett <josh@...htriplett.org> wrote:

> On Tue, Sep 23, 2014 at 10:01:20AM +0200, Borislav Petkov wrote:
>> ./arch/x86/include/asm/io_apic.h: In function ‘io_apic_modify’:
>> ./arch/x86/include/asm/io_apic.h:223:48: warning: declaration of ‘apic’ shadows a global declaration [-Wshadow]
>> static inline void io_apic_modify(unsigned int apic, unsigned int reg, unsigned int value)
>>                                                ^
>> In file included from ./arch/x86/include/asm/smp.h:12:0,
>>                 from include/linux/smp.h:59,
>>                 from include/linux/topology.h:33,
>>                 from include/linux/gfp.h:8,
>>                 from include/linux/kmod.h:22,
>>                 from include/linux/module.h:13,
>>                 from drivers/edac/amd64_edac.h:65,
>>                 from drivers/edac/amd64_edac.c:1:
>> ./arch/x86/include/asm/apic.h:366:21: warning: shadowed declaration is here [-Wshadow]
>> extern struct apic *apic;
>>                     ^
>> 
>> So gcc complains that an unsigned int shadows a struct apic pointer.
> 
> Here, I think the right fix involves picking a more descriptive name
> than "apic" for the global varible.

I agree, but I don't know enough about the area to necessarily know what it should be called instead. I do have a patch that changes the local variables instead, but even as I made it, I didn't really think it was right. But it silenced a ton of warnings and let me see other things.

-- 
Mark Rustad, Networking Division, Intel Corporation


Download attachment "signature.asc" of type "application/pgp-signature" (842 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ