]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] explicitly cast -1 to std::streampos. needed for some compilers.
authorJINMEI Tatuya <jinmei@isc.org>
Fri, 11 Jan 2013 18:35:54 +0000 (10:35 -0800)
committerJINMEI Tatuya <jinmei@isc.org>
Fri, 11 Jan 2013 18:35:54 +0000 (10:35 -0800)
src/lib/dns/master_lexer_inputsource.cc

index 335a0dd6dd399e3341c15abab8921fc9adb1a9c5..ec642a23d8587b8d6ebfcb139b42183a94860165 100644 (file)
@@ -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);