fix compiler warnings

This commit is contained in:
Ken Martin 2003-06-27 08:46:00 -04:00
parent 7456fc360e
commit bab4bcb570
2 changed files with 4 additions and 4 deletions

View File

@ -49,7 +49,7 @@ bool cmAuxSourceDirectoryCommand::InitialPass(std::vector<std::string> const& ar
size_t numfiles = dir.GetNumberOfFiles(); size_t numfiles = dir.GetNumberOfFiles();
for(size_t i =0; i < numfiles; ++i) for(size_t i =0; i < numfiles; ++i)
{ {
std::string file = dir.GetFile(i); std::string file = dir.GetFile(static_cast<unsigned long>(i));
// Split the filename into base and extension // Split the filename into base and extension
std::string::size_type dotpos = file.rfind("."); std::string::size_type dotpos = file.rfind(".");
if( dotpos != std::string::npos ) if( dotpos != std::string::npos )

View File

@ -270,12 +270,12 @@ void cmTryCompileCommand::CleanupFiles(const char* binDir)
size_t fileNum; size_t fileNum;
for (fileNum = 0; fileNum < dir.GetNumberOfFiles(); ++fileNum) for (fileNum = 0; fileNum < dir.GetNumberOfFiles(); ++fileNum)
{ {
if (strcmp(dir.GetFile(fileNum),".") && if (strcmp(dir.GetFile(static_cast<unsigned long>(fileNum)),".") &&
strcmp(dir.GetFile(fileNum),"..")) strcmp(dir.GetFile(static_cast<unsigned long>(fileNum)),".."))
{ {
std::string fullPath = binDir; std::string fullPath = binDir;
fullPath += "/"; fullPath += "/";
fullPath += dir.GetFile(fileNum); fullPath += dir.GetFile(static_cast<unsigned long>(fileNum));
if(cmSystemTools::FileIsDirectory(fullPath.c_str())) if(cmSystemTools::FileIsDirectory(fullPath.c_str()))
{ {
cmTryCompileCommand::CleanupFiles(fullPath.c_str()); cmTryCompileCommand::CleanupFiles(fullPath.c_str());