COMP: Fix check for file-too-big to avoid warnings.

This commit is contained in:
Brad King 2007-11-07 09:12:34 -05:00
parent 8b9dcc9e1a
commit 696a016444
1 changed files with 2 additions and 1 deletions

View File

@ -697,7 +697,8 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(const cmStdString& localprefix,
// off_t can be bigger than size_t. fread takes size_t. // off_t can be bigger than size_t. fread takes size_t.
// make sure the file is not too big. // make sure the file is not too big.
if (st.st_size > (size_t)-1) if(static_cast<off_t>(static_cast<size_t>(st.st_size)) !=
static_cast<off_t>(st.st_size))
{ {
cmCTestLog(this->CTest, ERROR_MESSAGE, " File too big: " cmCTestLog(this->CTest, ERROR_MESSAGE, " File too big: "
<< local_file.c_str() << std::endl); << local_file.c_str() << std::endl);