From 887699184a3cdbaa1b38f2c5a38e43de3e11b063 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Thu, 27 Sep 2007 14:44:11 -0400 Subject: [PATCH] COMP: remove warnings --- Source/CPack/cmCPackTGZGenerator.cxx | 5 +++-- Source/cmGeneratedFileStream.cxx | 2 +- Source/cmSystemTools.cxx | 2 +- Utilities/cmtar/libtar.c | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Source/CPack/cmCPackTGZGenerator.cxx b/Source/CPack/cmCPackTGZGenerator.cxx index 4d5c47034..22d6de365 100644 --- a/Source/CPack/cmCPackTGZGenerator.cxx +++ b/Source/CPack/cmCPackTGZGenerator.cxx @@ -129,7 +129,7 @@ ssize_t cmCPackTGZ_Data_Write(void *client_data, void *buff, size_t n) if ( mydata->Compress ) { - mydata->ZLibStream.avail_in = n; + mydata->ZLibStream.avail_in = static_cast(n); mydata->ZLibStream.next_in = reinterpret_cast(buff); do { @@ -157,7 +157,8 @@ ssize_t cmCPackTGZ_Data_Write(void *client_data, void *buff, size_t n) } if ( n ) { - mydata->CRC = crc32(mydata->CRC, reinterpret_cast(buff), n); + mydata->CRC = crc32(mydata->CRC, reinterpret_cast(buff), + static_cast(n)); } } else diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx index 82ac2b778..660d9d5ef 100644 --- a/Source/cmGeneratedFileStream.cxx +++ b/Source/cmGeneratedFileStream.cxx @@ -228,7 +228,7 @@ int cmGeneratedFileStreamBase::CompressFile(const char* oldname, char buffer[BUFFER_SIZE]; while ( (res = fread(buffer, 1, BUFFER_SIZE, ifs)) > 0 ) { - if ( !gzwrite(gf, buffer, res) ) + if ( !gzwrite(gf, buffer, static_cast(res)) ) { fclose(ifs); gzclose(gf); diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 2f5bb5b1c..04d688585 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1661,7 +1661,7 @@ ssize_t cmSystemToolsGZStructWrite(void* call_data, const void* buf, size_t count) { cmSystemToolsGZStruct* gzf = static_cast(call_data); - return gzwrite(gzf->GZFile, (void*)buf, count); + return gzwrite(gzf->GZFile, (void*)buf, static_cast(count)); } #endif diff --git a/Utilities/cmtar/libtar.c b/Utilities/cmtar/libtar.c index e9a14d8de..b50934935 100644 --- a/Utilities/cmtar/libtar.c +++ b/Utilities/cmtar/libtar.c @@ -130,13 +130,13 @@ static int libtar_gzclose(void* call_data) static ssize_t libtar_gzread(void* call_data, void* buf, size_t count) { struct gzStruct* gzf = (struct gzStruct*)call_data; - return gzread(gzf->GZFile, buf, count); + return gzread(gzf->GZFile, buf, (unsigned int)count); } static ssize_t libtar_gzwrite(void* call_data, const void* buf, size_t count) { struct gzStruct* gzf = (struct gzStruct*)call_data; - return gzwrite(gzf->GZFile, (void*)buf, count); + return gzwrite(gzf->GZFile, (void*)buf, (unsigned int)count); } tartype_t gztype = {