From 38122c22241cb8fe64f0d17cd3b084418f49edaa Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 28 Feb 2009 04:54:54 -0400 Subject: Corrected warnings g++-4.3.3 was complaining about --- src/error.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/error.cc') diff --git a/src/error.cc b/src/error.cc index 653980b4..8f78334a 100644 --- a/src/error.cc +++ b/src/error.cc @@ -77,12 +77,12 @@ string line_context(const string& line, return buf.str(); } -string source_context(const path& file, - std::size_t pos, - std::size_t end_pos, - const string& prefix) +string source_context(const path& file, + istream_pos_type pos, + istream_pos_type end_pos, + const string& prefix) { - std::size_t len = end_pos - pos; + std::streamoff len = end_pos - pos; if (! len || file == path("/dev/stdin")) return _(""); @@ -95,9 +95,9 @@ string source_context(const path& file, in.seekg(pos, std::ios::beg); scoped_array buf(new char[len + 1]); - in.read(buf.get(), len); + in.read(buf.get(), static_cast(len)); assert(static_cast(in.gcount()) == len); - buf[len] = '\0'; + buf[static_cast(len)] = '\0'; bool first = true; for (char * p = std::strtok(buf.get(), "\n"); -- cgit v1.2.3