gnucash maint: Fix remaining compiler errors in aqbanking5/aqbanking6 dependent code.

Christian Stimming cstim at code.gnucash.org
Sun Jun 30 10:44:16 EDT 2019


Updated	 via  https://github.com/Gnucash/gnucash/commit/da7cc037 (commit)
	from  https://github.com/Gnucash/gnucash/commit/98959f86 (commit)



commit da7cc037e25f410455d4b615b8f8cb726d093e12
Author: Christian Stimming <christian at cstimming.de>
Date:   Sun Jun 30 16:43:54 2019 +0200

    Fix remaining compiler errors in aqbanking5/aqbanking6 dependent code.

diff --git a/gnucash/import-export/aqb/gnc-ab-utils.c b/gnucash/import-export/aqb/gnc-ab-utils.c
index cec2a5766..9d7bee153 100644
--- a/gnucash/import-export/aqb/gnc-ab-utils.c
+++ b/gnucash/import-export/aqb/gnc-ab-utils.c
@@ -340,7 +340,6 @@ gnc_ab_get_remote_name(const AB_TRANSACTION *ab_trans)
 {
 #ifdef AQBANKING6
     const char* ab_remote_name;
-    const char* ab_transactionText;
 #else
     const GWEN_STRINGLIST *ab_remote_name;
 #endif
@@ -351,16 +350,7 @@ gnc_ab_get_remote_name(const AB_TRANSACTION *ab_trans)
     ab_remote_name = AB_Transaction_GetRemoteName(ab_trans);
     if (ab_remote_name)
 #ifdef AQBANKING6
-    ab_transactionText = AB_Transaction_GetPurpose(ab_trans);
-    if (ab_transactionText)
-    {
-        gchar *tmp;
-
-        tmp = g_strdup(ab_transactionText);
-        g_strstrip(tmp);
-        gnc_utf8_strip_invalid(tmp);
-        gnc_other_name = tmp;
-    }
+        gnc_other_name = g_strdup(ab_remote_name);
 #else
         GWEN_StringList_ForEach(ab_remote_name, join_ab_strings_cb,
                                 &gnc_other_name);
@@ -944,6 +934,9 @@ bal_accountinfo_cb(AB_IMEXPORTER_ACCOUNTINFO *element, gpointer user_data)
     time64 booked_tt = 0;
     GtkWidget *dialog;
     gboolean show_recn_window = FALSE;
+#ifndef AQBANKING6
+    AB_ACCOUNT_STATUS *best = NULL;
+#endif
 
     g_return_val_if_fail(element && data, NULL);
 
@@ -967,22 +960,22 @@ bal_accountinfo_cb(AB_IMEXPORTER_ACCOUNTINFO *element, gpointer user_data)
                                                AB_Balance_TypeBooked);
 #else
     {
-    AB_ACCOUNT_STATUS *item, *best = NULL;
-    const GWEN_TIME *best_time = NULL;
-    /* Lookup the most recent ACCOUNT_STATUS available */
-    item = AB_ImExporterAccountInfo_GetFirstAccountStatus(element);
-    while (item)
-    {
-        const GWEN_TIME *item_time = AB_AccountStatus_GetTime(item);
-        if (!best || GWEN_Time_Diff(best_time, item_time) < 0.0)
+        AB_ACCOUNT_STATUS *item = NULL;
+        const GWEN_TIME *best_time = NULL;
+        /* Lookup the most recent ACCOUNT_STATUS available */
+        item = AB_ImExporterAccountInfo_GetFirstAccountStatus(element);
+        while (item)
         {
-            best = item;
-            best_time = item_time;
+            const GWEN_TIME *item_time = AB_AccountStatus_GetTime(item);
+            if (!best || GWEN_Time_Diff(best_time, item_time) < 0.0)
+            {
+                best = item;
+                best_time = item_time;
+            }
+            item = AB_ImExporterAccountInfo_GetNextAccountStatus(element);
         }
-        item = AB_ImExporterAccountInfo_GetNextAccountStatus(element);
-    }
 
-    booked_bal = AB_AccountStatus_GetBookedBalance(best);
+        booked_bal = AB_AccountStatus_GetBookedBalance(best);
     }
 #endif
 



Summary of changes:
 gnucash/import-export/aqb/gnc-ab-utils.c | 41 +++++++++++++-------------------
 1 file changed, 17 insertions(+), 24 deletions(-)



More information about the gnucash-changes mailing list