ソースを参照

COMP: fix warnings

Ken Martin 18 年 前
コミット
fdbe20cf8b
2 ファイル変更3 行追加3 行削除
  1. 1 1
      Source/cmFileCommand.cxx
  2. 2 2
      Source/kwsys/SystemTools.cxx

+ 1 - 1
Source/cmFileCommand.cxx

@@ -231,7 +231,7 @@ bool cmFileCommand::HandleReadCommand(std::vector<std::string> const& args)
     {
     if (sizeLimit > 0)
       {
-      sizeLimit -= line.size();
+      sizeLimit = sizeLimit - static_cast<long>(line.size());
       if (has_newline)
         {
         sizeLimit--;

+ 2 - 2
Source/kwsys/SystemTools.cxx

@@ -3589,13 +3589,13 @@ bool SystemTools::GetLineFromStream(kwsys_ios::istream& is,
         }
       else
         {
-        leftToRead -= length;
+        leftToRead -= static_cast<long>(length);
         }
       }
 
     // Append the data read to the line.
     line.append(buffer);
-    sizeLimit -= length;
+    sizeLimit = sizeLimit - static_cast<long>(length);
     }
 
   // Return the results.