diff --git a/src/backend/xml/test/test-xml-pricedb.c b/src/backend/xml/test/test-xml-pricedb.c index 4bc97b1dbb..0fa8b05b9b 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 651911258e..4f866eba95 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 3eeb881d22..e895a36401 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 82f7d7279f..6697499008 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 e3503e4ef2..94b1c4279a 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 2f5b6c5975..81e647fcf8 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 bae515e0a5..1fe14e72b9 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);