gnucash unstable: Fix a few travis failures (potentially uninitialized use)

Geert Janssens gjanssens at code.gnucash.org
Sat Nov 18 14:41:30 EST 2017


Updated	 via  https://github.com/Gnucash/gnucash/commit/060e16b6 (commit)
	from  https://github.com/Gnucash/gnucash/commit/75fb4e7a (commit)



commit 060e16b671cf1dbce28c5d29b21a2c55f55670bf
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Sat Nov 18 20:41:10 2017 +0100

    Fix a few travis failures (potentially uninitialized use)

diff --git a/gnucash/gnome/dialog-payment.c b/gnucash/gnome/dialog-payment.c
index 62b8ca0..b78d2c8 100644
--- a/gnucash/gnome/dialog-payment.c
+++ b/gnucash/gnome/dialog-payment.c
@@ -452,13 +452,16 @@ gnc_payment_window_fill_docs_list (PaymentWindow *pw)
             else
             {
                 GncOwner lotowner;
+                gncOwnerInitUndefined(&lotowner, NULL);
                 if (!gncOwnerGetOwnerFromLot(lot_info->lot, &lotowner))
                 {
                     const GncOwner *owner;
                     const GncInvoice *invoice = gncInvoiceGetInvoiceFromLot(lot_info->lot);
                     if (invoice)
+                    {
                         owner = gncOwnerGetEndOwner (gncInvoiceGetOwner (invoice));
-                    gncOwnerCopy (owner, &lotowner);
+                        gncOwnerCopy (owner, &lotowner);
+                    }
                 }
                 if (gncOwnerEqual(&pw->owner, &lotowner))
                     list = g_list_prepend (list, lot_info->lot);
@@ -1504,7 +1507,7 @@ static Split *select_payment_split (GtkWidget *parent, Transaction *txn)
     {
         Split *selected_split = NULL;
         GList *node;
-        GtkWidget *first_rb;
+        GtkWidget *first_rb = NULL;
         int answer = GTK_BUTTONS_OK;
         const char *message = _("While this transaction has multiple splits that can be considered\nas 'the payment split', gnucash only knows how to handle one.\n"
                                 "Please select one, the others will be ignored.\n\n");



Summary of changes:
 gnucash/gnome/dialog-payment.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)



More information about the gnucash-changes mailing list