DragonFly users List (threaded) for 2008-07
DragonFly BSD
DragonFly users List (threaded) for 2008-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Hammer on snapshot cd's


From: Vincent Stemen <vince.dragonfly@xxxxxxxxxxx>
Date: Tue, 15 Jul 2008 18:12:12 -0500

On Tue, Jul 15, 2008 at 10:43:29PM +0200, Joerg Sonnenberger wrote:
> On Tue, Jul 15, 2008 at 03:22:34PM -0500, Vincent Stemen wrote:
> > Compiling with "gcc -o query -g -Wall main.c" produced no warnings at
> > all.  But when I added #include "query.c" to the main code module after
> > it was working stand alone,  I got a number of compiler warnings about
> > possible use of initialized variables in functions that are in query.c.
> 
> This is depending a lot on the call graph analyser and without
> optimising it simply isn't done.
> 
> Joerg

Ah!  I finally understand what you were trying to tell me here!  It
finally dawned on me when Johannes said -O2 revealed another
uninitialized variable in hammer_btree.c.  Sure enough, I was using -O2
in my top level makefile but not when compiling standalone with my test
main.c.  After grabbing my previous version, from before I fixed the
warnings, and compiling with "-O2 -Wall", the warnings did indeed
appear.

I had no idea that the two options combined would affect the level of
warning output.  I still have not found in the gcc manual where it tells
me that.  

Thanks, Joerge, for solving that mystery for me :-).




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]