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: johannes.hofmann@xxxxxx
Date: 15 Jul 2008 21:55:17 GMT

Joerg Sonnenberger <joerg@britannica.bec.de> 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 nice! Compiling with -O2 revealed another one:

Index: /hammer/usr/src/sys/vfs/hammer/hammer_btree.c
===================================================================
RCS file: /home/dcvs/src/sys/vfs/hammer/hammer_btree.c,v
retrieving revision 1.72
diff -p -u -r1.72 hammer_btree.c
--- /hammer/usr/src/sys/vfs/hammer/hammer_btree.c	15 Jul 2008 18:01:58 -0000	1.72
+++ /hammer/usr/src/sys/vfs/hammer/hammer_btree.c	15 Jul 2008 21:45:42 -0000
@@ -375,7 +375,7 @@ hammer_btree_iterate_reverse(hammer_curs
 {
 	hammer_node_ondisk_t node;
 	hammer_btree_elm_t elm;
-	int error;
+	int error = 0;
 	int r;
 	int s;

Cheers,
Johannes
 
 

> 
> Joerg



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