diff --git a/gnucash/import-export/csv-imp/gnc-imp-props-price.cpp b/gnucash/import-export/csv-imp/gnc-imp-props-price.cpp index 874d218baa..a7a7185ed0 100644 --- a/gnucash/import-export/csv-imp/gnc-imp-props-price.cpp +++ b/gnucash/import-export/csv-imp/gnc-imp-props-price.cpp @@ -66,7 +66,7 @@ GncNumeric parse_amount_price (const std::string &str, int currency_format) std::string str_no_symbols = boost::u32regex_replace(str, expr, ""); /* Convert based on user chosen currency format */ - gnc_numeric val; + gnc_numeric val = gnc_numeric_zero(); char *endptr; switch (currency_format) { diff --git a/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp b/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp index 25ec7b7ac1..4df60017c5 100644 --- a/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp +++ b/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp @@ -114,7 +114,7 @@ GncNumeric parse_amount (const std::string &str, int currency_format) std::string str_no_symbols = boost::u32regex_replace(str, expr, ""); /* Convert based on user chosen currency format */ - gnc_numeric val; + gnc_numeric val = gnc_numeric_zero(); char *endptr; switch (currency_format) { diff --git a/gnucash/register/ledger-core/gncEntryLedger.c b/gnucash/register/ledger-core/gncEntryLedger.c index 8bf2d1972d..86b5b31850 100644 --- a/gnucash/register/ledger-core/gncEntryLedger.c +++ b/gnucash/register/ledger-core/gncEntryLedger.c @@ -721,7 +721,7 @@ void gnc_entry_ledger_compute_value (GncEntryLedger *ledger, gnc_numeric *value, gnc_numeric *tax_value) { - gnc_numeric qty, price, discount; + gnc_numeric qty, price = gnc_numeric_zero(), discount = gnc_numeric_zero(); gint disc_type, disc_how; gboolean taxable, taxincluded; GncTaxTable *table; diff --git a/gnucash/register/ledger-core/split-register-model.c b/gnucash/register/ledger-core/split-register-model.c index 34f887a41d..bc83f095a6 100644 --- a/gnucash/register/ledger-core/split-register-model.c +++ b/gnucash/register/ledger-core/split-register-model.c @@ -597,7 +597,7 @@ gnc_split_register_use_negative_color (VirtualLocation virt_loc, SplitRegister *reg) { const char * cell_name; - gnc_numeric value; + gnc_numeric value = gnc_numeric_zero(); Split *split; if (!use_red_for_negative)