summaryrefslogtreecommitdiff
path: root/src/draft.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-03-06 23:04:27 -0600
committerJohn Wiegley <johnw@newartisans.com>2012-03-06 23:04:27 -0600
commit71d0033b6f65260698cf0bf367002a9b6429a3fd (patch)
tree63fc939f0e613a1828fc0b7b473bc6c29578f074 /src/draft.cc
parent488355e5d92923e1d764625457b866f4fc83d58b (diff)
downloadfork-ledger-71d0033b6f65260698cf0bf367002a9b6429a3fd.tar.gz
fork-ledger-71d0033b6f65260698cf0bf367002a9b6429a3fd.tar.bz2
fork-ledger-71d0033b6f65260698cf0bf367002a9b6429a3fd.zip
Corrected several compile and link problems
Diffstat (limited to 'src/draft.cc')
-rw-r--r--src/draft.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/draft.cc b/src/draft.cc
index 017c637d..9abc769e 100644
--- a/src/draft.cc
+++ b/src/draft.cc
@@ -109,7 +109,14 @@ void draft_t::parse_args(const value_t& args)
}
else if (check_for_date &&
bool(weekday = string_to_day_of_week(what[0]))) {
+#if defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 6
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#endif
short dow = static_cast<short>(*weekday);
+#if defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 6
+#pragma GCC diagnostic pop
+#endif
date_t date = CURRENT_DATE() - date_duration(1);
while (date.day_of_week() != dow)
date -= date_duration(1);