diff options
author | Brad King <brad.king@kitware.com> | 2007-11-05 19:34:36 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-11-05 19:34:36 (GMT) |
commit | f410f8578eea403d0ca657e46ec7659cd0f805e7 (patch) | |
tree | 09715a217fb40d51d17508c95244dbdfa6d1d399 /Source/kwsys/SystemTools.cxx | |
parent | cfa723d45792ef6969304fb7d9274778f662a116 (diff) | |
download | CMake-f410f8578eea403d0ca657e46ec7659cd0f805e7.zip CMake-f410f8578eea403d0ca657e46ec7659cd0f805e7.tar.gz CMake-f410f8578eea403d0ca657e46ec7659cd0f805e7.tar.bz2 |
COMP: Fix warnings on 64-bit Mac OS X build. Patch from issue #3697.
Diffstat (limited to 'Source/kwsys/SystemTools.cxx')
-rw-r--r-- | Source/kwsys/SystemTools.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index 759dc9f..accfdd9 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -1588,17 +1588,16 @@ bool SystemTools::FilesDiffer(const char* source, // Compare the files a block at a time. char source_buf[KWSYS_ST_BUFFER]; char dest_buf[KWSYS_ST_BUFFER]; - long nleft = statSource.st_size; + off_t nleft = statSource.st_size; while(nleft > 0) { // Read a block from each file. - long nnext = (nleft > KWSYS_ST_BUFFER)? KWSYS_ST_BUFFER : nleft; + kwsys_ios::streamsize nnext = (nleft > KWSYS_ST_BUFFER)? KWSYS_ST_BUFFER : static_cast<kwsys_ios::streamsize>(nleft); finSource.read(source_buf, nnext); finDestination.read(dest_buf, nnext); // If either failed to read assume they are different. - if(static_cast<long>(finSource.gcount()) != nnext || - static_cast<long>(finDestination.gcount()) != nnext) + if(finSource.gcount() != nnext || finDestination.gcount() != nnext) { return true; } |