gnucash maint: New Xcode, new errors, sigh.

John Ralls jralls at code.gnucash.org
Tue Mar 22 19:42:05 EDT 2016


Updated	 via  https://github.com/Gnucash/gnucash/commit/e003cb07 (commit)
	from  https://github.com/Gnucash/gnucash/commit/aec61497 (commit)



commit e003cb07db1fe0d93361a676e5347ca57f136ca3
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Mar 22 17:24:41 2016 -0700

    New Xcode, new errors, sigh.

diff --git a/src/backend/xml/test/test-xml-pricedb.c b/src/backend/xml/test/test-xml-pricedb.c
index 4bc97b1..0fa8b05 100644
--- a/src/backend/xml/test/test-xml-pricedb.c
+++ b/src/backend/xml/test/test-xml-pricedb.c
@@ -89,7 +89,7 @@ test_db (GNCPriceDB *db)
 
     {
         sixtp *parser;
-	load_counter lc;
+	load_counter lc = {0, 0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0, 0};
         sixtp_gdv2 data = {book, lc, NULL, NULL, FALSE};
 
         parser = sixtp_new ();
diff --git a/src/gnome-utils/gnc-combott.c b/src/gnome-utils/gnc-combott.c
index 6519112..4f866eb 100644
--- a/src/gnome-utils/gnc-combott.c
+++ b/src/gnome-utils/gnc-combott.c
@@ -537,7 +537,7 @@ which_tooltip_cb (GtkWidget  *widget, gint x, gint y, gboolean keyboard_mode, Gt
     GncCombott *combott = GNC_COMBOTT (user_data);
     GncCombottPrivate *priv = GNC_COMBOTT_GET_PRIVATE (combott);
 
-    if(!priv->active == 0)
+    if(priv->active != 0)
     {
         gtk_tree_model_get( priv->model, &priv->active_iter, priv->tip_col, &text, -1 );
         if(g_strcmp0(text, "") && (text != NULL))
diff --git a/src/gnome-utils/gnc-tree-model-split-reg.c b/src/gnome-utils/gnc-tree-model-split-reg.c
index 3eeb881..e895a36 100644
--- a/src/gnome-utils/gnc-tree-model-split-reg.c
+++ b/src/gnome-utils/gnc-tree-model-split-reg.c
@@ -3292,7 +3292,7 @@ gnc_tree_model_split_reg_event_handler (QofInstance *entity,
             {
                 gnc_commodity *split_com;
                 split_com = xaccAccountGetCommodity (acc);
-                if (!g_strcmp0 (gnc_commodity_get_namespace (split_com), "template") == 0)
+                if (g_strcmp0 (gnc_commodity_get_namespace (split_com), "template") != 0)
                 {
                     DEBUG("Insert trans %p for gl (%s)", trans, name);
                     gtm_sr_insert_trans (model, trans, TRUE);
diff --git a/src/gnome-utils/gnc-tree-view-split-reg.c b/src/gnome-utils/gnc-tree-view-split-reg.c
index 82f7d72..6697499 100644
--- a/src/gnome-utils/gnc-tree-view-split-reg.c
+++ b/src/gnome-utils/gnc-tree-view-split-reg.c
@@ -1408,7 +1408,7 @@ gtv_sr_cdf0 (GtkTreeViewColumn *col, GtkCellRenderer *cell, GtkTreeModel *s_mode
     gboolean is_template = FALSE;
     gboolean negative_in_red = FALSE;
     gboolean show_extra_dates = FALSE;
-    gnc_numeric num;
+    gnc_numeric num = gnc_numeric_zero();
     const gchar *s = "";
     const gchar *row_color;
     RowDepth depth;
diff --git a/src/import-export/csv-imp/assistant-csv-account-import.c b/src/import-export/csv-imp/assistant-csv-account-import.c
index e3503e4..94b1c42 100644
--- a/src/import-export/csv-imp/assistant-csv-account-import.c
+++ b/src/import-export/csv-imp/assistant-csv-account-import.c
@@ -458,7 +458,7 @@ csv_import_assistant_summary_page_prepare (GtkAssistant *assistant,
     if (info->new_book)
         info->new_book = gnc_new_book_option_display (info->window);
 
-    if (!g_strcmp0 (info->error, "") == 0)
+    if (g_strcmp0 (info->error, "") != 0)
     {
         GtkTextBuffer *buffer;
 
diff --git a/src/import-export/csv-imp/csv-account-import.c b/src/import-export/csv-imp/csv-account-import.c
index 2f5b6c5..81e647f 100644
--- a/src/import-export/csv-imp/csv-account-import.c
+++ b/src/import-export/csv-imp/csv-account-import.c
@@ -262,14 +262,14 @@ csv_account_import (CsvImportInfo *info)
                     xaccAccountSetName (acc, name);
                     xaccAccountSetType (acc, xaccAccountStringToEnum (type));
 
-                    if (!g_strcmp0 (notes, "") == 0)
+                    if (g_strcmp0 (notes, "") != 0)
                         xaccAccountSetNotes (acc, notes);
-                    if (!g_strcmp0 (description, "") == 0)
+                    if (g_strcmp0 (description, "") != 0)
                         xaccAccountSetDescription (acc, description);
-                    if (!g_strcmp0 (code, "") == 0)
+                    if (g_strcmp0 (code, "") != 0)
                         xaccAccountSetCode (acc, code);
 
-                    if (!g_strcmp0 (color, "") == 0)
+                    if (g_strcmp0 (color, "") != 0)
                     {
                         if (gdk_color_parse (color, &testcolor))
                             xaccAccountSetColor (acc, color);
@@ -309,19 +309,19 @@ csv_account_import (CsvImportInfo *info)
             /* Lets try and update the color, notes, description, code entries */
             DEBUG("Existing account, will try and update account %s", full_name);
             info->num_updates = info->num_updates + 1;
-            if (!g_strcmp0 (color, "") == 0)
+            if (g_strcmp0 (color, "") != 0)
             {
                 if (gdk_color_parse (color, &testcolor))
                     xaccAccountSetColor (acc, color);
             }
 
-            if (!g_strcmp0 (notes, "") == 0)
+            if (g_strcmp0 (notes, "") != 0)
                 xaccAccountSetNotes (acc, notes);
 
-            if (!g_strcmp0 (description, "") == 0)
+            if (g_strcmp0 (description, "") != 0)
                 xaccAccountSetDescription (acc, description);
 
-            if (!g_strcmp0 (code, "") == 0)
+            if (g_strcmp0 (code, "") != 0)
                 xaccAccountSetCode (acc, code);
         }
         valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (info->store), &iter);
diff --git a/src/import-export/csv-imp/gnc-csv-model.c b/src/import-export/csv-imp/gnc-csv-model.c
index bae515e..1fe14e7 100644
--- a/src/import-export/csv-imp/gnc-csv-model.c
+++ b/src/import-export/csv-imp/gnc-csv-model.c
@@ -496,7 +496,7 @@ int gnc_csv_load_file (GncCsvParseData* parse_data, const char* filename,
     parse_data->raw_str.end = parse_data->raw_str.begin + g_mapped_file_get_length (parse_data->raw_mapping);
 
     /* Make a guess at the encoding of the data. */
-    if (!g_mapped_file_get_length (parse_data->raw_mapping) == 0)
+    if (g_mapped_file_get_length (parse_data->raw_mapping) != 0)
         guess_enc = go_guess_encoding ((const char*)(parse_data->raw_str.begin),
                                       (size_t)(parse_data->raw_str.end - parse_data->raw_str.begin),
                                       "UTF-8", NULL);



Summary of changes:
 src/backend/xml/test/test-xml-pricedb.c                  |  2 +-
 src/gnome-utils/gnc-combott.c                            |  2 +-
 src/gnome-utils/gnc-tree-model-split-reg.c               |  2 +-
 src/gnome-utils/gnc-tree-view-split-reg.c                |  2 +-
 src/import-export/csv-imp/assistant-csv-account-import.c |  2 +-
 src/import-export/csv-imp/csv-account-import.c           | 16 ++++++++--------
 src/import-export/csv-imp/gnc-csv-model.c                |  2 +-
 7 files changed, 14 insertions(+), 14 deletions(-)



More information about the gnucash-changes mailing list