diff options
author | John Wiegley <johnw@newartisans.com> | 2012-03-06 23:04:27 -0600 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-03-06 23:04:27 -0600 |
commit | 71d0033b6f65260698cf0bf367002a9b6429a3fd (patch) | |
tree | 63fc939f0e613a1828fc0b7b473bc6c29578f074 /src/filters.cc | |
parent | 488355e5d92923e1d764625457b866f4fc83d58b (diff) | |
download | fork-ledger-71d0033b6f65260698cf0bf367002a9b6429a3fd.tar.gz fork-ledger-71d0033b6f65260698cf0bf367002a9b6429a3fd.tar.bz2 fork-ledger-71d0033b6f65260698cf0bf367002a9b6429a3fd.zip |
Corrected several compile and link problems
Diffstat (limited to 'src/filters.cc')
-rw-r--r-- | src/filters.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/filters.cc b/src/filters.cc index 8543cddb..34df2056 100644 --- a/src/filters.cc +++ b/src/filters.cc @@ -833,10 +833,17 @@ void subtotal_posts::report_subtotal(const char * spec_fmt, foreach (post_t * post, component_posts) { date_t date = post->date(); date_t value_date = post->value_date(); +#if defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 6 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif if (! range_start || date < *range_start) range_start = date; if (! range_finish || value_date > *range_finish) range_finish = value_date; +#if defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 6 +#pragma GCC diagnostic pop +#endif } } component_posts.clear(); @@ -880,8 +887,10 @@ void subtotal_posts::operator()(post_t& post) if (i == values.end()) { value_t temp; post.add_to_value(temp, amount_expr); - std::pair<values_map::iterator, bool> result - = values.insert(values_pair(acct->fullname(), acct_value_t(acct, temp))); +#if defined(DEBUG_ON) + std::pair<values_map::iterator, bool> result = +#endif + values.insert(values_pair(acct->fullname(), acct_value_t(acct, temp))); assert(result.second); } else { post.add_to_value((*i).second.value, amount_expr); |