linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][2.6] fix warning in iee1394 nodemgr
@ 2003-07-16  6:01 Zwane Mwaikambo
  2003-07-16 14:10 ` Ben Collins
  0 siblings, 1 reply; 5+ messages in thread
From: Zwane Mwaikambo @ 2003-07-16  6:01 UTC (permalink / raw)
  To: Linux Kernel; +Cc: bcollins

Looks like a sensible default

drivers/ieee1394/nodemgr.c: In function `nodemgr_host_thread':
drivers/ieee1394/nodemgr.c:1621: warning: `generation' might be used uninitialized in this function

Index: linux-2.5/drivers/ieee1394/nodemgr.c
===================================================================
RCS file: /home/cvs/linux-2.5/drivers/ieee1394/nodemgr.c,v
retrieving revision 1.28
diff -u -p -B -r1.28 nodemgr.c
--- linux-2.5/drivers/ieee1394/nodemgr.c	29 Jun 2003 18:51:20 -0000	1.28
+++ linux-2.5/drivers/ieee1394/nodemgr.c	16 Jul 2003 03:54:56 -0000
@@ -1618,7 +1618,7 @@ static int nodemgr_host_thread(void *__h
 	 * happens when we get a bus reset. */
 	while (!down_interruptible(&hi->reset_sem) &&
 	       !down_interruptible(&nodemgr_serialize)) {
-		unsigned int generation;
+		unsigned int generation = get_hpsb_generation(host);
 		int i;
 
 		/* Pause for 1/4 second, to make sure things settle down. */

-- 
function.linuxpower.ca

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH][2.6] fix warning in iee1394 nodemgr
  2003-07-16  6:01 [PATCH][2.6] fix warning in iee1394 nodemgr Zwane Mwaikambo
@ 2003-07-16 14:10 ` Ben Collins
  2003-07-16 14:46   ` David S. Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Ben Collins @ 2003-07-16 14:10 UTC (permalink / raw)
  To: Zwane Mwaikambo; +Cc: Linux Kernel

On Wed, Jul 16, 2003 at 02:01:12AM -0400, Zwane Mwaikambo wrote:
> Looks like a sensible default
> 
> drivers/ieee1394/nodemgr.c: In function `nodemgr_host_thread':
> drivers/ieee1394/nodemgr.c:1621: warning: `generation' might be used uninitialized in this function

Not a good default, but I'll fix it.

I'm a little concerned that I've never seen either of the two warnings
you showed. I've been building with -Werror for awhile now.

-- 
Debian     - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH][2.6] fix warning in iee1394 nodemgr
  2003-07-16 14:10 ` Ben Collins
@ 2003-07-16 14:46   ` David S. Miller
  2003-07-16 14:50     ` Ben Collins
  2003-07-16 16:21     ` Zwane Mwaikambo
  0 siblings, 2 replies; 5+ messages in thread
From: David S. Miller @ 2003-07-16 14:46 UTC (permalink / raw)
  To: Ben Collins; +Cc: zwane, linux-kernel

On Wed, 16 Jul 2003 10:10:08 -0400
Ben Collins <bcollins@debian.org> wrote:

> I'm a little concerned that I've never seen either of the two warnings
> you showed. I've been building with -Werror for awhile now.

GCC generates slightly different flow graphs on different
platforms, and from version to version gcc's "might be used
uninitialized" accuracy varies :-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH][2.6] fix warning in iee1394 nodemgr
  2003-07-16 14:46   ` David S. Miller
@ 2003-07-16 14:50     ` Ben Collins
  2003-07-16 16:21     ` Zwane Mwaikambo
  1 sibling, 0 replies; 5+ messages in thread
From: Ben Collins @ 2003-07-16 14:50 UTC (permalink / raw)
  To: David S. Miller; +Cc: zwane, linux-kernel

On Wed, Jul 16, 2003 at 07:46:37AM -0700, David S. Miller wrote:
> On Wed, 16 Jul 2003 10:10:08 -0400
> Ben Collins <bcollins@debian.org> wrote:
> 
> > I'm a little concerned that I've never seen either of the two warnings
> > you showed. I've been building with -Werror for awhile now.
> 
> GCC generates slightly different flow graphs on different
> platforms, and from version to version gcc's "might be used
> uninitialized" accuracy varies :-)

Ok, I knew it wouldn't be too long before something forced me to do
non-sparc64 compiles again :)


-- 
Debian     - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH][2.6] fix warning in iee1394 nodemgr
  2003-07-16 14:46   ` David S. Miller
  2003-07-16 14:50     ` Ben Collins
@ 2003-07-16 16:21     ` Zwane Mwaikambo
  1 sibling, 0 replies; 5+ messages in thread
From: Zwane Mwaikambo @ 2003-07-16 16:21 UTC (permalink / raw)
  To: David S. Miller; +Cc: Ben Collins, linux-kernel

On Wed, 16 Jul 2003, David S. Miller wrote:

> On Wed, 16 Jul 2003 10:10:08 -0400
> Ben Collins <bcollins@debian.org> wrote:
> 
> > I'm a little concerned that I've never seen either of the two warnings
> > you showed. I've been building with -Werror for awhile now.
> 
> GCC generates slightly different flow graphs on different
> platforms, and from version to version gcc's "might be used
> uninitialized" accuracy varies :-)

Come to think of it, i just switched back to RH 2.96 for my test kernels 
(just for compile speed, slow build box).

-- 
function.linuxpower.ca

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-07-16 16:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-16  6:01 [PATCH][2.6] fix warning in iee1394 nodemgr Zwane Mwaikambo
2003-07-16 14:10 ` Ben Collins
2003-07-16 14:46   ` David S. Miller
2003-07-16 14:50     ` Ben Collins
2003-07-16 16:21     ` Zwane Mwaikambo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).