lkml.org 
[lkml]   [2014]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/7] Silence even more W=2 warnings
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.

- Josh Triplett
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2014-09-23 17:21    [W:0.138 / U:1.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site