Subject: Re: Warnings in nfsv3 code--buggy gcc?
To: Allen Briggs <>
From: Jason Thorpe <>
List: tech-kern
Date: 03/28/1996 22:16:31
On Thu, 28 Mar 1996 23:00:35 -0500 (EST) 
 Allen Briggs <> wrote:

 > I'm trying to compile a kernel on the mac with -Wall -Werror
 > -Wstrict-prototypes and -Wmissing-prototypes (copied from Makefile.sparc).
 > I can't, however, get past nfs_serv.c and nfs_socket.c because
 > gcc complains:
 > ../../../../nfs/nfs_socket.c: In function `nfs_timer':
 > ../../../../nfs/nfs_socket.c:1243: warning: `cur_usec' might be used uninitialized in this function

I had to commmit a bit of evil to avoid a similar warning in some other 
code on the sparc...If you initialize the variable with "0" or whatever 
before it's used, the warning will go away...

For the record, I think that this sort of warning from gcc is completely 
bogus.  If we want meaningful warnings, we should turn on those which 
produce meaningful warnings ... -Wall often produces noise.

...y'know, it strikes me as interesting that this warning doesn't show up 
in a SPARC kernel build... "weird" :-)

Jason R. Thorpe                             
NASA Ames Research Center                               Home: 408.866.1912
NAS: M/S 258-6                                          Work: 415.604.0935
Moffett Field, CA 94035                                Pager: 415.428.6939