Browse Source

[master] explicitly cast -1 to std::streampos. needed for some compilers.

JINMEI Tatuya 12 years ago
parent
commit
a032d84ef4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/lib/dns/master_lexer_inputsource.cc

+ 1 - 1
src/lib/dns/master_lexer_inputsource.cc

@@ -53,7 +53,7 @@ getStreamSize(std::istream& is) {
         return (MasterLexer::SOURCE_SIZE_UNKNOWN);
     }
     const std::streampos len = is.tellg();
-    if (len == -1) {
+    if (len == static_cast<std::streampos>(-1)) { // cast for some compilers
         isc_throw(InputSource::OpenError, "failed to get input size");
     }
     is.seekg(0, std::ios::beg);