* [PATCH]io_apic.c: fix compile warning
@ 2009-06-17 14:25 Figo.zhang
2009-06-17 14:28 ` Alan Cox
0 siblings, 1 reply; 4+ messages in thread
From: Figo.zhang @ 2009-06-17 14:25 UTC (permalink / raw)
To: Ingo Molnar; +Cc: lkml
fix compile warning:
arch/x86/kernel/apic/io_apic.c: In function ‘ioapic_write_entry’:
arch/x86/kernel/apic/io_apic.c:466: warning: ‘eu’ is used uninitialized in this function
arch/x86/kernel/apic/io_apic.c:465: note: ‘eu’ was declared here
Signed-off-by: Figo.zhang <figo1802@gmail.com>
---
arch/x86/kernel/apic/io_apic.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index ef8d929..e9ca066 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -462,7 +462,7 @@ static struct IO_APIC_route_entry ioapic_read_entry(int apic, int pin)
static void
__ioapic_write_entry(int apic, int pin, struct IO_APIC_route_entry e)
{
- union entry_union eu;
+ union entry_union eu = {{0,0}};
eu.entry = e;
io_apic_write(apic, 0x11 + 2*pin, eu.w2);
io_apic_write(apic, 0x10 + 2*pin, eu.w1);
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH]io_apic.c: fix compile warning
2009-06-17 14:25 [PATCH]io_apic.c: fix compile warning Figo.zhang
@ 2009-06-17 14:28 ` Alan Cox
2009-06-17 14:29 ` Figo.zhang
[not found] ` <bb33bcf20906170729n616dcdbfkc02a168347612138@mail.gmail.com>
0 siblings, 2 replies; 4+ messages in thread
From: Alan Cox @ 2009-06-17 14:28 UTC (permalink / raw)
To: Figo.zhang; +Cc: Ingo Molnar, lkml
On Wed, 17 Jun 2009 22:25:20 +0800
"Figo.zhang" <figo1802@gmail.com> wrote:
> fix compile warning:
> arch/x86/kernel/apic/io_apic.c: In function ‘ioapic_write_entry’:
> arch/x86/kernel/apic/io_apic.c:466: warning: ‘eu’ is used uninitialized in this function
> arch/x86/kernel/apic/io_apic.c:465: note: ‘eu’ was declared here
What compiler are you using. Current gcc correctly notices that there are
no uninitialized things to worry about ?
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH]io_apic.c: fix compile warning
2009-06-17 14:28 ` Alan Cox
@ 2009-06-17 14:29 ` Figo.zhang
[not found] ` <bb33bcf20906170729n616dcdbfkc02a168347612138@mail.gmail.com>
1 sibling, 0 replies; 4+ messages in thread
From: Figo.zhang @ 2009-06-17 14:29 UTC (permalink / raw)
To: Alan Cox; +Cc: Ingo Molnar, lkml
On Wed, 2009-06-17 at 15:28 +0100, Alan Cox wrote:
> On Wed, 17 Jun 2009 22:25:20 +0800
> "Figo.zhang" <figo1802@gmail.com> wrote:
>
> > fix compile warning:
> > arch/x86/kernel/apic/io_apic.c: In function ‘ioapic_write_entry’:
> > arch/x86/kernel/apic/io_apic.c:466: warning: ‘eu’ is used uninitialized in this function
> > arch/x86/kernel/apic/io_apic.c:465: note: ‘eu’ was declared here
>
> What compiler are you using. Current gcc correctly notices that there are
> no uninitialized things to worry about ?
hi Alan:
my gcc is:
[figo@myhost linux-2.6]$ gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure --prefix=/usr --enable-shared
--enable-languages=c,c++,fortran,objc,obj-c++ --enable-threads=posix
--mandir=/usr/share/man --infodir=/usr/share/info --enable-__cxa_atexit
--disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib
--enable-clocale=gnu --disable-libstdcxx-pch --with-tune=generic
Thread model: posix
gcc version 4.4.0 20090526 (prerelease) (GCC)
[figo@myhost linux-2.6]$
Best Regards,
Figo.zhang
^ permalink raw reply [flat|nested] 4+ messages in thread[parent not found: <bb33bcf20906170729n616dcdbfkc02a168347612138@mail.gmail.com>]
* Re: [PATCH]io_apic.c: fix compile warning
[not found] ` <bb33bcf20906170729n616dcdbfkc02a168347612138@mail.gmail.com>
@ 2009-06-17 14:35 ` Subrata Modak
0 siblings, 0 replies; 4+ messages in thread
From: Subrata Modak @ 2009-06-17 14:35 UTC (permalink / raw)
To: Figo.zhang; +Cc: Ingo Molnar, lkml, Alan Cox
> On Wed, 17 Jun 2009 22:25:20 +0800
> "Figo.zhang" <figo1802@gmail.com> wrote:
>
> > fix compile warning:
> > arch/x86/kernel/apic/io_apic.c: In function ‘ioapic_write_entry’:
> > arch/x86/kernel/apic/io_apic.c:466: warning: ‘eu’ is used uninitialized in this function
> > arch/x86/kernel/apic/io_apic.c:465: note: ‘eu’ was declared here
>
> What compiler are you using. Current gcc correctly notices that there are
> no uninitialized things to worry about ?
Even 4.4.0 and above reports this warning. Last time i remember it
generated somewhere around 70 such warnings. And, then you need to dig
down whether any of them will really introduce bug(s). Else, leave as it
is. It is more of a gcc problem rather than kernel.
Regards--
Subrata
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-06-17 14:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-17 14:25 [PATCH]io_apic.c: fix compile warning Figo.zhang
2009-06-17 14:28 ` Alan Cox
2009-06-17 14:29 ` Figo.zhang
[not found] ` <bb33bcf20906170729n616dcdbfkc02a168347612138@mail.gmail.com>
2009-06-17 14:35 ` Subrata Modak
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.