r18361 - gnucash/trunk/src/register/ledger-core - Fix compiler warnings.

Christian Stimming cstim at code.gnucash.org
Sat Oct 3 07:37:52 EDT 2009


Author: cstim
Date: 2009-10-03 07:37:52 -0400 (Sat, 03 Oct 2009)
New Revision: 18361
Trac: http://svn.gnucash.org/trac/changeset/18361

Modified:
   gnucash/trunk/src/register/ledger-core/split-register-model.c
Log:
Fix compiler warnings.

Patch by Colin Law: Attached is a patch to fix compiler warnings in
split-register-model.c.  In fact for me they prevent compilation,
possibly because I have specified --enable-compile-warnings.  I have
inspected the code and it appears that the warnings are unfounded, the
code appears to be safe, though I can see why the warnings were
generated.

Signed-off-by: Christian Stimming <stimming at tuhh.de>

Modified: gnucash/trunk/src/register/ledger-core/split-register-model.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register-model.c	2009-10-03 11:33:31 UTC (rev 18360)
+++ gnucash/trunk/src/register/ledger-core/split-register-model.c	2009-10-03 11:37:52 UTC (rev 18361)
@@ -66,9 +66,10 @@
   Split *split;
   SRInfo *info = gnc_split_register_get_info (reg);
   gnc_numeric value = gnc_numeric_zero(), balance = gnc_numeric_zero();
-  Account *account;
+  Account *account = NULL;
   Transaction *trans;
-  GList *node, *children, *child;
+  GList *node, *child;
+  GList *children = NULL;
   int i, row;
 
   balance = gnc_numeric_zero();



More information about the gnucash-changes mailing list