diff options
author | John Wiegley <johnw@newartisans.com> | 2013-05-19 02:06:45 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2013-05-19 02:14:27 -0500 |
commit | db35e5c8fccf965c7383bebcfca8f7c3ad681d3b (patch) | |
tree | 945181016d58b48b2de6d60bf04a87cd39d6b18c | |
parent | 0ab56f5d85ca20005e60eeafc2a7a2ce169689ee (diff) | |
download | fork-ledger-db35e5c8fccf965c7383bebcfca8f7c3ad681d3b.tar.gz fork-ledger-db35e5c8fccf965c7383bebcfca8f7c3ad681d3b.tar.bz2 fork-ledger-db35e5c8fccf965c7383bebcfca8f7c3ad681d3b.zip |
Resolve new compiler warnings from Clang
-rw-r--r-- | src/amount.cc | 2 | ||||
-rw-r--r-- | src/generate.cc | 4 | ||||
-rw-r--r-- | src/generate.h | 4 | ||||
-rw-r--r-- | src/global.h | 2 | ||||
-rw-r--r-- | src/journal.cc | 6 | ||||
-rw-r--r-- | src/print.cc | 2 | ||||
-rw-r--r-- | src/stream.cc | 5 | ||||
-rw-r--r-- | src/utils.cc | 2 |
8 files changed, 10 insertions, 17 deletions
diff --git a/src/amount.cc b/src/amount.cc index 55cbabeb..4fe73546 100644 --- a/src/amount.cc +++ b/src/amount.cc @@ -1107,9 +1107,11 @@ bool amount_t::parse(std::istream& in, const parse_flags_t& flags) bool decimal_comma_style = (commodity_t::decimal_comma_by_default || commodity().has_flags(COMMODITY_STYLE_DECIMAL_COMMA)); +#if 0 bool time_colon_style = (commodity_t::time_colon_by_default || commodity().has_flags(COMMODITY_STYLE_TIME_COLON)); +#endif new_quantity->prec = 0; diff --git a/src/generate.cc b/src/generate.cc index 2b471c87..5bf424bb 100644 --- a/src/generate.cc +++ b/src/generate.cc @@ -39,10 +39,8 @@ namespace ledger { generate_posts_iterator::generate_posts_iterator (session_t& _session, unsigned int _seed, - std::size_t _quantity, - bool _allow_invalid) + std::size_t _quantity) : session(_session), seed(_seed), quantity(_quantity), - allow_invalid(_allow_invalid), rnd_gen(seed == 0 ? static_cast<unsigned int>(std::time(0)) : seed), diff --git a/src/generate.h b/src/generate.h index f171605b..697feb64 100644 --- a/src/generate.h +++ b/src/generate.h @@ -55,7 +55,6 @@ class generate_posts_iterator session_t& session; unsigned int seed; std::size_t quantity; - bool allow_invalid; date_t next_date; date_t next_aux_date; @@ -100,8 +99,7 @@ class generate_posts_iterator public: generate_posts_iterator(session_t& _session, unsigned int _seed = 0, - std::size_t _quantity = 100, - bool _allow_invalid = false); + std::size_t _quantity = 100); virtual ~generate_posts_iterator() throw() { TRACE_DTOR(generate_posts_iterator); diff --git a/src/global.h b/src/global.h index c024dce2..5fa67d2c 100644 --- a/src/global.h +++ b/src/global.h @@ -99,11 +99,11 @@ public: void report_error(const std::exception& err); + void execute_command(strings_list args, bool at_repl); /** * @return \c true if a command was actually executed; otherwise, it probably * just resulted in setting some options. */ - void execute_command(strings_list args, bool at_repl); int execute_command_wrapper(strings_list args, bool at_repl); value_t push_command(call_scope_t&) { diff --git a/src/journal.cc b/src/journal.cc index c4c8fd98..3e2ecbea 100644 --- a/src/journal.cc +++ b/src/journal.cc @@ -134,9 +134,9 @@ account_t * journal_t::register_account(const string& name, post_t * post, // that can be expanded successfully size_t colon = name.find(':'); if(colon != string::npos) { - accounts_map::const_iterator i = account_aliases.find(name.substr(0, colon)); - if (i != account_aliases.end()) { - result = find_account((*i).second->fullname() + name.substr(colon)); + accounts_map::const_iterator j = account_aliases.find(name.substr(0, colon)); + if (j != account_aliases.end()) { + result = find_account((*j).second->fullname() + name.substr(colon)); } } } diff --git a/src/print.cc b/src/print.cc index f04f59d5..0683f2e3 100644 --- a/src/print.cc +++ b/src/print.cc @@ -210,7 +210,7 @@ namespace { string amt; if (post->amount_expr) { std::ostringstream amt_str; - justify(amt_str, post->amount_expr->text(), amount_width, true); + justify(amt_str, post->amount_expr->text(), (int)amount_width, true); amt = amt_str.str(); } else if (count == 2 && index == 2 && diff --git a/src/stream.cc b/src/stream.cc index ad03ab77..c00c4cc5 100644 --- a/src/stream.cc +++ b/src/stream.cc @@ -48,11 +48,6 @@ namespace { * * This function returns only for the process that is still Ledger. * - * @param out Pointer to a pointer to the output stream. This The - * pointer to the output stream is changed so that the stream is - * connected to the stdin of the pager. The caller is responsible for - * cleaning this up. - * * @param pager_path Path to the pager command. * * @return The file descriptor of the pipe to the pager. The caller diff --git a/src/utils.cc b/src/utils.cc index 2f592325..4f810f93 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -635,7 +635,7 @@ optional<boost::u32regex> _log_category_re; optional<boost::regex> _log_category_re; #endif -struct __maybe_enable_debugging { +static struct __maybe_enable_debugging { __maybe_enable_debugging() { if (const char * p = std::getenv("LEDGER_DEBUG")) { _log_level = LOG_DEBUG; |