COMP: fix warnings

This commit is contained in:
Ken Martin 2007-03-02 10:48:58 -05:00
parent a0e26986f7
commit fdbe20cf8b
2 changed files with 3 additions and 3 deletions

View File

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

View File

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