2003-07-16 05:57:45

by Zwane Mwaikambo

[permalink] [raw]
Subject: [PATCH][2.6] fix warning in iee1394 nodemgr

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


2003-07-16 13:56:05

by Ben Collins

[permalink] [raw]
Subject: Re: [PATCH][2.6] fix warning in iee1394 nodemgr

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/

2003-07-16 14:31:57

by David Miller

[permalink] [raw]
Subject: Re: [PATCH][2.6] fix warning in iee1394 nodemgr

On Wed, 16 Jul 2003 10:10:08 -0400
Ben Collins <[email protected]> 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 :-)

2003-07-16 14:37:07

by Ben Collins

[permalink] [raw]
Subject: Re: [PATCH][2.6] fix warning in iee1394 nodemgr

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 <[email protected]> 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/

2003-07-16 16:17:35

by Zwane Mwaikambo

[permalink] [raw]
Subject: Re: [PATCH][2.6] fix warning in iee1394 nodemgr

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

> On Wed, 16 Jul 2003 10:10:08 -0400
> Ben Collins <[email protected]> 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