Subject: Re: Warnings in nfsv3 code--buggy gcc?
To: Allen Briggs <briggs@puma.bevd.blacksburg.va.us>
From: Per Fogelstrom <pefo@enea.se>
List: tech-kern
Date: 03/30/1996 10:25:44
> 
> int foo()
> {
> 	u_quad_t	off;
> 
> 	if (xxx) {
> 		do stuff
> 		off = something;
> 		use off
> 	}
> 
> loop1:
> 	off = something;
> 	use off
> }
> 
> Note that 'off' is u_quad_t in all cases.
> 

Hmm.. tried your example on 2.7.2 (mips) without any complaints (-Wall).
But the above exapmple is maybe not represenative for the real code.

> I've run into the case you mention a lot, and that doesn't bother me--I
> can see how the compiler could miss a lot of reasonable cases.  In
> general, though, I believe in coding around at least this warning because
> this particular one has caught me on the (rare) occasion...
> 

Well one could also consider it being bad coding, suceptible to break
if someone does changes to it in the future. Perhaps. So "fixing" it,
or "coding around" may be a good idea.