Subject: Re: Warnings in nfsv3 code--buggy gcc?
To: Allen Briggs <briggs@puma.bevd.blacksburg.va.us>
From: J.T. Conklin <jconklin@netcom.com>
List: tech-kern
Date: 03/29/1996 07:05:40
> (the warning in nfs/nfs_serv.c was for a variable of the same name)
> As far as I can tell by looking at the code, this is a completely bogus
> warning.  Has anyone else run across this?  Does anyone know enough
> about gcc to know how this might be happening?  Could it be related to
> the fact that cur_usec is a u_quad_t?

Gcc's flow analysis for -Wuninitialized is unable to detect some cases
where a variable is conditionally initialized and then used in similar
conditional code later in the function.  This results in "false
positives".

-Wuninitialized is a good warning, but since it's not 100%, I don't
recommend combining it with -Werror.  Some people get around this by
always initializing the variable to some dummy value.  I think this
is terrible practice, as it defeats the ability of run-time tools 
that track variable usage to detect uninitialized variable usage.

	--jtc