summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/error.cc3
-rw-r--r--src/times.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/error.cc b/src/error.cc
index 9a654ccc..54d17ad3 100644
--- a/src/error.cc
+++ b/src/error.cc
@@ -98,7 +98,8 @@ string source_context(const path& file,
scoped_array<char> buf(new char[len + 1]);
in.read(buf.get(), static_cast<int>(len));
- assert(static_cast<std::size_t>(in.gcount()) == len);
+ assert(static_cast<std::size_t>(in.gcount()) ==
+ static_cast<std::size_t>(len));
buf[static_cast<int>(len)] = '\0';
bool first = true;
diff --git a/src/times.h b/src/times.h
index 141066a5..1ff98325 100644
--- a/src/times.h
+++ b/src/times.h
@@ -110,7 +110,7 @@ inline std::string format_datetime(const datetime_t& when,
const optional<std::string>& format = none)
{
char buf[256];
- time_t moment = to_time_t(when);
+ std::time_t moment = to_time_t(when);
std::strftime(buf, 255, format ? format->c_str() :
output_datetime_format.c_str(), std::localtime(&moment));
return buf;