[cmake-commits] king committed SystemTools.cxx 1.207 1.208
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Nov 5 14:34:38 EST 2007
Update of /cvsroot/CMake/CMake/Source/kwsys
In directory public:/mounts/ram/cvs-serv14305/Source/kwsys
Modified Files:
SystemTools.cxx
Log Message:
COMP: Fix warnings on 64-bit Mac OS X build. Patch from issue #3697.
Index: SystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/kwsys/SystemTools.cxx,v
retrieving revision 1.207
retrieving revision 1.208
diff -u -d -r1.207 -r1.208
--- SystemTools.cxx 26 Oct 2007 16:13:01 -0000 1.207
+++ SystemTools.cxx 5 Nov 2007 19:34:36 -0000 1.208
@@ -1588,17 +1588,16 @@
// 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;
}
More information about the Cmake-commits
mailing list