From b42052464ba9701a3d1834fc58fa0deb32ab9afe Mon Sep 17 00:00:00 2001 From: Romanos Skiadas Date: Fri, 27 Aug 2021 01:00:32 +0300 Subject: [PATCH] fix spurious error about uninitialized have_end in gnc_tree_view_account_select_subaccounts, gcc thinks have_end might not be initialized, but since the function exits if num_children == 0, the while (num_children) loop will always be entered. Silence the warning. --- gnucash/gnome-utils/gnc-tree-view-account.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnucash/gnome-utils/gnc-tree-view-account.c b/gnucash/gnome-utils/gnc-tree-view-account.c index 9049213651..35c33f2e85 100644 --- a/gnucash/gnome-utils/gnc-tree-view-account.c +++ b/gnucash/gnome-utils/gnc-tree-view-account.c @@ -1676,7 +1676,7 @@ gnc_tree_view_account_select_subaccounts (GncTreeViewAccount *view, GtkTreeSelection *selection; GtkTreePath *sp_account, *sp_start, *sp_end; GtkTreeIter si_account, si_start, si_end; - gboolean have_start, have_end; + gboolean have_start, have_end = FALSE; gint num_children; ENTER("view %p, account %p (%s)", view, account, xaccAccountGetName(account));