summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackDebGenerator.cxx10
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx4
-rw-r--r--Source/CPack/cmCPackPackageMakerGenerator.cxx4
-rw-r--r--Source/CPack/cmCPackPackageMakerGenerator.h2
4 files changed, 10 insertions, 10 deletions
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index 75bf36f..0c9eab6 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -338,7 +338,7 @@ static int copy_ar(CF *cfp, off_t size)
{
static char pad = '\n';
off_t sz = size;
- int nr, nw;
+ size_t nr, nw;
char buf[8*1024];
if (sz == 0)
@@ -347,11 +347,11 @@ static int copy_ar(CF *cfp, off_t size)
FILE* from = cfp->rFile;
FILE* to = cfp->wFile;
while (sz &&
- (nr = fread(buf, 1, sz < off_t(sizeof(buf)) ? sz : sizeof(buf), from ))
+ (nr = fread(buf, 1, sz < static_cast<off_t>(sizeof(buf)) ? static_cast<size_t>(sz) : sizeof(buf), from ))
> 0) {
sz -= nr;
- for (int off = 0; off < nr; nr -= off, off += nw)
- if ((nw = fwrite(buf + off, 1, nr, to)) < 0)
+ for (size_t off = 0; off < nr; nr -= off, off += nw)
+ if ((nw = fwrite(buf + off, 1, nr, to)) < nr)
return -1;
}
if (sz)
@@ -424,7 +424,7 @@ static int ar_append(const char* archive,const std::vector<std::string>& files)
FILE* aFile = fopen(archive, "wb+");
if (aFile!=NULL) {
fwrite(ARMAG, SARMAG, 1, aFile);
- if (fseek(aFile, (off_t)0, SEEK_END) != (off_t)-1) {
+ if (fseek(aFile, 0, SEEK_END) != -1) {
CF cf;
struct stat sb;
/* Read from disk, write to an archive; pad on write. */
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index 8fa1152..953b367 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -216,8 +216,8 @@ int cmCPackNSISGenerator::InitializeInternal()
<< "Please check " << tmpFile.c_str() << " for errors" << std::endl);
return 0;
}
- float nsisVersion = atof(versionRex.match(1).c_str());
- float minNSISVersion = 2.09;
+ double nsisVersion = atof(versionRex.match(1).c_str());
+ double minNSISVersion = 2.09;
cmCPackLogger(cmCPackLog::LOG_DEBUG, "NSIS Version: "
<< nsisVersion << std::endl);
if ( nsisVersion < minNSISVersion )
diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/Source/CPack/cmCPackPackageMakerGenerator.cxx
index 79dac06..47078a7 100644
--- a/Source/CPack/cmCPackPackageMakerGenerator.cxx
+++ b/Source/CPack/cmCPackPackageMakerGenerator.cxx
@@ -30,7 +30,7 @@
//----------------------------------------------------------------------
cmCPackPackageMakerGenerator::cmCPackPackageMakerGenerator()
{
- this->PackageMakerVersion = 0;
+ this->PackageMakerVersion = 0.0;
}
//----------------------------------------------------------------------
@@ -196,7 +196,7 @@ int cmCPackPackageMakerGenerator::InitializeInternal()
return 0;
}
this->PackageMakerVersion = atof(rexVersion.match(1).c_str());
- if ( this->PackageMakerVersion < 1 )
+ if ( this->PackageMakerVersion < 1.0 )
{
cmCPackLogger(cmCPackLog::LOG_ERROR, "Require PackageMaker 1.0 or higher"
<< std::endl);
diff --git a/Source/CPack/cmCPackPackageMakerGenerator.h b/Source/CPack/cmCPackPackageMakerGenerator.h
index 21cb4fc..ee6f302 100644
--- a/Source/CPack/cmCPackPackageMakerGenerator.h
+++ b/Source/CPack/cmCPackPackageMakerGenerator.h
@@ -48,7 +48,7 @@ protected:
bool CopyCreateResourceFile(const char* name);
bool CopyResourcePlistFile(const char* name);
- float PackageMakerVersion;
+ double PackageMakerVersion;
};
#endif