DragonFly users List (threaded) for 2008-07
Re: Hammer on snapshot cd's
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.
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
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
Thanks, Joerge, for solving that mystery for me :-).