diff options
author | Brad King <brad.king@kitware.com> | 2010-06-29 13:52:12 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-06-29 13:52:12 (GMT) |
commit | ff1f8d0b53c37336645d4d53fc30134540d17ddd (patch) | |
tree | 140deb30db33b7dfdae6d22ecf43897640526d42 /Source/cmSystemTools.cxx | |
parent | 6fc4cd86806b349c804cf9dacb2dd04c289a684f (diff) | |
download | CMake-ff1f8d0b53c37336645d4d53fc30134540d17ddd.zip CMake-ff1f8d0b53c37336645d4d53fc30134540d17ddd.tar.gz CMake-ff1f8d0b53c37336645d4d53fc30134540d17ddd.tar.bz2 |
Fix or cast more integer conversions in cmake
These were revealed by GCC's -Wconversion option. Fix types where it is
easy to do so. Cast in cases we know the integer will not be truncated.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 5be53c2..0badbba 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1989,9 +1989,9 @@ namespace{ # pragma warn -8066 /* unreachable code */ #endif -int copy_data(struct archive *ar, struct archive *aw) +long copy_data(struct archive *ar, struct archive *aw) { - int r; + long r; const void *buff; size_t size; off_t offset; @@ -2136,7 +2136,7 @@ int cmSystemTools::WaitForLine(cmsysProcess* process, std::string& line, } else if(*outiter == '\n' || *outiter == '\0') { - int length = outiter-out.begin(); + std::vector<char>::size_type length = outiter-out.begin(); if(length > 1 && *(outiter-1) == '\r') { --length; @@ -2159,7 +2159,7 @@ int cmSystemTools::WaitForLine(cmsysProcess* process, std::string& line, } else if(*erriter == '\n' || *erriter == '\0') { - int length = erriter-err.begin(); + std::vector<char>::size_type length = erriter-err.begin(); if(length > 1 && *(erriter-1) == '\r') { --length; |