diff options
author | David Cole <david.cole@kitware.com> | 2010-06-27 15:22:05 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2010-06-27 15:22:05 (GMT) |
commit | 415900ba77648c2472bb2022c46136830a627562 (patch) | |
tree | ae6ad0c55510934ca89bc88aa2a8f759b14de89a /Source/CPack | |
parent | 4745f4996b73a778f6bdd25669c59b6a6c115fe4 (diff) | |
download | CMake-415900ba77648c2472bb2022c46136830a627562.zip CMake-415900ba77648c2472bb2022c46136830a627562.tar.gz CMake-415900ba77648c2472bb2022c46136830a627562.tar.bz2 |
Eliminate -Wconversion warnings.
Change types of local variables, or casting, or re-arrange
expressions to get rid of "conversion may alter value" warnings
as seen on recent dashboard submissions from londinium.kitware.
Diffstat (limited to 'Source/CPack')
-rw-r--r-- | Source/CPack/cmCPackDebGenerator.cxx | 6 | ||||
-rw-r--r-- | Source/CPack/cmCPackNSISGenerator.cxx | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index 9c77cc1..c254dbb 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -135,7 +135,7 @@ int cmCPackDebGenerator::CompressFiles(const char* outFileName, // now add all directories which have to be compressed // collect all top level install dirs for that // e.g. /opt/bin/foo, /usr/bin/bar and /usr/bin/baz would give /usr and /opt - int topLevelLength = strlen(toplevel); + size_t topLevelLength = strlen(toplevel); std::set<std::string> installDirs; for (std::vector<std::string>::const_iterator fileIt = files.begin(); fileIt != files.end(); ++ fileIt ) @@ -431,7 +431,7 @@ static int put_arobj(CF *cfp, struct stat *sb) /* If not truncating names and the name is too long or contains * a space, use extended format 1. */ - unsigned int lname = strlen(name); + size_t lname = strlen(name); uid_t uid = sb->st_uid; gid_t gid = sb->st_gid; if (uid > USHRT_MAX) { @@ -441,7 +441,7 @@ static int put_arobj(CF *cfp, struct stat *sb) gid = USHRT_MAX; } if (lname > sizeof(hdr->ar_name) || strchr(name, ' ')) - (void)sprintf(ar_hb, HDR1, AR_EFMT1, lname, + (void)sprintf(ar_hb, HDR1, AR_EFMT1, (int)lname, (long int)sb->st_mtime, uid, gid, sb->st_mode, (long long)sb->st_size + lname, ARFMAG); else { diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx index ad77386..8329546 100644 --- a/Source/CPack/cmCPackNSISGenerator.cxx +++ b/Source/CPack/cmCPackNSISGenerator.cxx @@ -758,7 +758,7 @@ CreateComponentDescription(cmCPackComponent *component, } // Create the NSIS code to download this file on-the-fly. - unsigned totalSizeInKbytes = (totalSize + 512) / 1024; + unsigned long totalSizeInKbytes = (totalSize + 512) / 1024; if (totalSizeInKbytes == 0) { totalSizeInKbytes = 1; |