From 060e16b671cf1dbce28c5d29b21a2c55f55670bf Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Sat, 18 Nov 2017 20:41:10 +0100 Subject: [PATCH] Fix a few travis failures (potentially uninitialized use) --- gnucash/gnome/dialog-payment.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gnucash/gnome/dialog-payment.c b/gnucash/gnome/dialog-payment.c index 62b8ca09d7..b78d2c8455 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");