summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-03-11 05:08:55 -0500
committerJohn Wiegley <johnw@newartisans.com>2012-03-11 05:08:55 -0500
commit62c04deb8719444d1f958d40fe6442b714bb7e50 (patch)
tree296c3e1742bbafc10d6cd9f67585a2ba68e5c3d2 /src
parent020de80f6012bb323f11da77e0ca3c8841999491 (diff)
downloadfork-ledger-62c04deb8719444d1f958d40fe6442b714bb7e50.tar.gz
fork-ledger-62c04deb8719444d1f958d40fe6442b714bb7e50.tar.bz2
fork-ledger-62c04deb8719444d1f958d40fe6442b714bb7e50.zip
Quieted several compiler warnings from Clang
Diffstat (limited to 'src')
-rw-r--r--src/option.h5
-rw-r--r--src/report.cc4
-rw-r--r--src/value.cc2
3 files changed, 6 insertions, 5 deletions
diff --git a/src/option.h b/src/option.h
index f892b00e..36dba3a4 100644
--- a/src/option.h
+++ b/src/option.h
@@ -162,9 +162,8 @@ public:
source = none;
}
- virtual void handler_thunk(const optional<string>& whence) {}
- virtual void handler_thunk(const optional<string>& whence,
- const string& str) {}
+ virtual void handler_thunk(const optional<string>&) {}
+ virtual void handler_thunk(const optional<string>&, const string&) {}
value_t handler(call_scope_t& args) {
if (wants_arg) {
diff --git a/src/report.cc b/src/report.cc
index 3151b211..1adbe9d0 100644
--- a/src/report.cc
+++ b/src/report.cc
@@ -195,7 +195,8 @@ void report_t::normalize_options(const string& verb)
long date_width = (HANDLED(date_width_) ?
lexical_cast<long>(HANDLER(date_width_).str()) :
- format_date(CURRENT_DATE(),FMT_PRINTED).length());
+ static_cast<long>
+ (format_date(CURRENT_DATE(),FMT_PRINTED).length()));
long payee_width = (HANDLED(payee_width_) ?
lexical_cast<long>(HANDLER(payee_width_).str()) :
long(double(cols) * 0.263157));
@@ -825,6 +826,7 @@ value_t report_t::fn_nail_down(call_scope_t& args)
throw_(std::runtime_error, _("Attempting to nail down %1")
<< args[0].label());
}
+ return arg0;
}
value_t report_t::fn_lot_date(call_scope_t& args)
diff --git a/src/value.cc b/src/value.cc
index cae2a356..c14a7104 100644
--- a/src/value.cc
+++ b/src/value.cc
@@ -1468,7 +1468,7 @@ value_t value_t::exchange_commodities(const std::string& commodities,
}
}
- int index = 0;
+ std::size_t index = 0;
foreach (commodity_t * comm, comms) {
switch (type()) {
case AMOUNT: