Re: [Patch] Fix compiler warnings/errors in split-register-model.c

2009-10-03 Thread Christian Stimming
Am Mittwoch, 30. September 2009 16:58 schrieb 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.

 I am using git svn and am not sure in what format the patch is
 required.  I performed git diff to get this.  If I should do something
 different please let me know.

Applied to SVN, r18361. Thanks a lot!

Your diff format was just fine. You can use either git diff or git 
format-patch; both work very nicely.

Regards,

Christian
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


[Patch] Fix compiler warnings/errors in split-register-model.c

2009-09-30 Thread 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.

I am using git svn and am not sure in what format the patch is
required.  I performed git diff to get this.  If I should do something
different please let me know.

Colin
diff --git a/src/register/ledger-core/split-register-model.c b/src/register/ledger-core/split-register-model.c
index b22452a..dcb5dd2 100644
--- a/src/register/ledger-core/split-register-model.c
+++ b/src/register/ledger-core/split-register-model.c
@@ -66,9 +66,10 @@ gnc_split_register_get_rbaln (VirtualLocation virt_loc, gpointer user_data, gboo
   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();
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [Patch] Fix compiler warnings/errors in split-register-model.c

2009-09-30 Thread Colin Law
2009/9/30 Phil Longstaff plongst...@rogers.com:
 That format should work.  I'll apply it.

Great, thanks

Colin
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel