diff options
author | John Wiegley <johnw@newartisans.com> | 2007-05-11 07:20:49 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 03:38:42 -0400 |
commit | 48b46a23b183fc576f7e999a166d1e130233032c (patch) | |
tree | 5d3b645149d473a2638431450e73efcc0905e921 /src | |
parent | 8e20c378d6ee6eb36f8c6866f8c9ec52f8600c58 (diff) | |
download | ledger-48b46a23b183fc576f7e999a166d1e130233032c.tar.gz ledger-48b46a23b183fc576f7e999a166d1e130233032c.tar.bz2 ledger-48b46a23b183fc576f7e999a166d1e130233032c.zip |
Disabled compiler warnings from icc.
Diffstat (limited to 'src')
-rw-r--r-- | src/amount.cc | 2 | ||||
-rw-r--r-- | src/ofx.h | 8 | ||||
-rw-r--r-- | src/option.cc | 4 | ||||
-rw-r--r-- | src/quotes.cc | 1 | ||||
-rw-r--r-- | src/session.h | 2 | ||||
-rw-r--r-- | src/utils.cc | 4 | ||||
-rw-r--r-- | src/utils.h | 6 | ||||
-rw-r--r-- | src/value.cc | 6 | ||||
-rw-r--r-- | src/value.h | 2 | ||||
-rw-r--r-- | src/xml.h | 1 |
10 files changed, 19 insertions, 17 deletions
diff --git a/src/amount.cc b/src/amount.cc index 0025fbd9..b014112b 100644 --- a/src/amount.cc +++ b/src/amount.cc @@ -497,7 +497,6 @@ amount_t& amount_t::operator*=(const amount_t& amt) mpz_mul(MPZ(quantity), MPZ(quantity), MPZ(amt.quantity)); quantity->prec += amt.quantity->prec; - finish: if (! has_commodity()) commodity_ = amt.commodity_; @@ -547,7 +546,6 @@ amount_t& amount_t::operator/=(const amount_t& amt) mpz_round(MPZ(quantity), MPZ(quantity), quantity->prec, quantity->prec - 1); quantity->prec -= 1; - finish: if (! has_commodity()) commodity_ = amt.commodity_; @@ -41,10 +41,10 @@ class ofx_parser_t : public parser_t public: virtual bool test(std::istream& in) const; - virtual unsigned int parse(std::istream& in, - journal_t * journal, - account_t * master = NULL, - const string * original_file = NULL); + virtual unsigned int parse(std::istream& in, + journal_t * journal, + account_t * master = NULL, + const optional<path>& original = optional<path>()); }; } // namespace ledger diff --git a/src/option.cc b/src/option.cc index 51b5459e..dd0dad4b 100644 --- a/src/option.cc +++ b/src/option.cc @@ -170,7 +170,6 @@ void process_arguments(int argc, char ** argv, const bool anywhere, } // --long-option or -s - again: if ((*i)[1] == '-') { if ((*i)[2] == '\0') break; @@ -241,9 +240,6 @@ void process_arguments(int argc, char ** argv, const bool anywhere, checked_delete(*o); } } - - next: - ; } } diff --git a/src/quotes.cc b/src/quotes.cc index c38beafd..d5dbd4fe 100644 --- a/src/quotes.cc +++ b/src/quotes.cc @@ -111,6 +111,7 @@ quotes_by_script::operator()(commodity_t& commodity, "Failed to download price for '" << commodity.symbol() << "' (command: \"getquote " << commodity.base_symbol() << "\")"); } + return optional<amount_t>(); } } // namespace ledger diff --git a/src/session.h b/src/session.h index 4693cacf..40fb5c4a 100644 --- a/src/session.h +++ b/src/session.h @@ -153,7 +153,7 @@ class session_t : public xml::xpath_t::scope_t account_t * master = NULL, const optional<path>& original = optional<path>()); - unsigned int read_journal(const path& path, + unsigned int read_journal(const path& pathname, journal_t * journal, account_t * master = NULL, const optional<path>& original = optional<path>()); diff --git a/src/utils.cc b/src/utils.cc index e4e0f2bc..bcbffdca 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -454,10 +454,8 @@ static inline void stream_memory_size(std::ostream& out, std::size_t size) out << (double(size) / 1024.0) << 'K'; else if (size < (1024 * 1024 * 1024)) out << (double(size) / (1024.0 * 1024.0)) << 'M'; - else if (size < (1024 * 1024 * 1024 * 1024)) - out << (double(size) / (1024.0 * 1024.0 * 1024.0)) << 'G'; else - assert(false); + out << (double(size) / (1024.0 * 1024.0 * 1024.0)) << 'G'; } static bool logger_has_run = false; diff --git a/src/utils.h b/src/utils.h index 8ff142ca..4dabd7ea 100644 --- a/src/utils.h +++ b/src/utils.h @@ -102,9 +102,9 @@ namespace ledger { typedef gregorian::date_duration date_duration; typedef posix_time::seconds seconds; - typedef filesystem::path path; - typedef boost::filesystem::ifstream ifstream; - typedef boost::filesystem::ofstream ofstream; + typedef boost::filesystem::path path; + typedef boost::filesystem::ifstream ifstream; + typedef boost::filesystem::ofstream ofstream; typedef boost::filesystem::filesystem_error filesystem_error; } diff --git a/src/value.cc b/src/value.cc index 6623e1a1..63719266 100644 --- a/src/value.cc +++ b/src/value.cc @@ -392,6 +392,7 @@ value_t& value_t::operator+=(const value_t& val) throw_(value_error, "Cannot add " << label() << " to " << val.label()); + return *this; } value_t& value_t::operator-=(const value_t& val) @@ -541,6 +542,7 @@ value_t& value_t::operator-=(const value_t& val) throw_(value_error, "Cannot subtract " << label() << " from " << val.label()); + return *this; } value_t& value_t::operator*=(const value_t& val) @@ -626,6 +628,7 @@ value_t& value_t::operator*=(const value_t& val) throw_(value_error, "Cannot multiply " << label() << " with " << val.label()); + return *this; } value_t& value_t::operator/=(const value_t& val) @@ -695,6 +698,7 @@ value_t& value_t::operator/=(const value_t& val) throw_(value_error, "Cannot divide " << label() << " by " << val.label()); + return *this; } @@ -1228,6 +1232,7 @@ value_t value_t::value(const optional<moment_t>& moment) const } throw_(value_error, "Cannot find the value of " << label()); + return value_t(); } void value_t::in_place_reduce() @@ -1269,6 +1274,7 @@ value_t value_t::round() const } throw_(value_error, "Cannot round " << label()); + return value_t(); } value_t value_t::unround() const diff --git a/src/value.h b/src/value.h index 4f5908b3..917f732f 100644 --- a/src/value.h +++ b/src/value.h @@ -327,6 +327,8 @@ class value_t assert(false); break; } + assert(false); + return "<invalid>"; } operator bool() const; @@ -127,6 +127,7 @@ public: virtual value_t to_value() const { throw_(conversion_error, "Cannot convert node to a value"); + return value_t(); } virtual void print(std::ostream& out, int depth = 0) const = 0; |