diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-03-13 15:25:11 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-03-13 15:25:11 (GMT) |
commit | 809b32fe59ee9923eebbcfc373d9eaab158083e9 (patch) | |
tree | cbb36213252d97bf3f7d21b301b4f65aa7a5342c | |
parent | 83a0759e479ee0718296a1bb8f6fb26e1b13500a (diff) | |
download | CMake-809b32fe59ee9923eebbcfc373d9eaab158083e9.zip CMake-809b32fe59ee9923eebbcfc373d9eaab158083e9.tar.gz CMake-809b32fe59ee9923eebbcfc373d9eaab158083e9.tar.bz2 |
ENH: remove several compiler warnings
-rw-r--r-- | Source/CMakeLists.txt | 36 | ||||
-rw-r--r-- | Source/cmAuxSourceDirectoryCommand.cxx | 4 | ||||
-rw-r--r-- | Source/cmCableClassSet.cxx | 2 | ||||
-rw-r--r-- | Source/cmCableClassSet.h | 2 | ||||
-rw-r--r-- | Source/cmDirectory.cxx | 6 | ||||
-rw-r--r-- | Source/cmDirectory.h | 4 | ||||
-rw-r--r-- | Source/cmFLTKWrapUICommand.cxx | 4 | ||||
-rw-r--r-- | Source/cmFindFileCommand.cxx | 2 | ||||
-rw-r--r-- | Source/cmFindLibraryCommand.cxx | 2 | ||||
-rw-r--r-- | Source/cmFindPathCommand.cxx | 2 | ||||
-rw-r--r-- | Source/cmFindProgramCommand.cxx | 2 | ||||
-rw-r--r-- | Source/cmMSDotNETGenerator.cxx | 22 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 4 | ||||
-rw-r--r-- | Source/cmNMakeMakefileGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/cmQTWrapCPPCommand.cxx | 4 | ||||
-rw-r--r-- | Source/cmQTWrapUICommand.cxx | 4 | ||||
-rw-r--r-- | Source/cmRegularExpression.cxx | 12 | ||||
-rw-r--r-- | Source/cmSourceGroup.cxx | 6 | ||||
-rw-r--r-- | Source/cmSystemTools.cxx | 5 | ||||
-rw-r--r-- | Source/cmVTKMakeInstantiatorCommand.cxx | 8 | ||||
-rw-r--r-- | Source/cmVTKWrapJavaCommand.cxx | 4 | ||||
-rw-r--r-- | Source/cmVTKWrapPythonCommand.cxx | 8 | ||||
-rw-r--r-- | Source/cmVTKWrapTclCommand.cxx | 8 | ||||
-rw-r--r-- | Source/cmaketest.cxx | 4 | ||||
-rw-r--r-- | Source/ctest.cxx | 6 |
25 files changed, 96 insertions, 67 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index ffdf58e..9f2d6c7 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -25,6 +25,22 @@ cmCacheManager.cxx cmCableClassSet.cxx cmSourceGroup.cxx cmListFileCache.cxx +cmake.h +cmakewizard.h +cmMakeDepend.h +cmMakefile.h +cmMakefileGenerator.h +cmRegularExpression.h +cmSourceFile.h +cmSystemTools.h +cmDirectory.h +cmCommands.h +cmTarget.h +cmCustomCommand.h +cmCacheManager.h +cmCableClassSet.h +cmSourceGroup.h +cmListFileCache.h ) # configure the .h file @@ -37,10 +53,20 @@ INCLUDE_DIRECTORIES(${CMake_BINARY_DIR}/Source) ADD_DEFINITIONS(-DCMAKE_BUILD_WITH_CMAKE) IF (WIN32) - SOURCE_FILES(SRCS cmDSWWriter.cxx cmDSPWriter.cxx cmMSProjectGenerator.cxx) - SOURCE_FILES(SRCS cmBorlandMakefileGenerator.cxx) - SOURCE_FILES(SRCS cmNMakeMakefileGenerator.cxx) - SOURCE_FILES(SRCS cmMSDotNETGenerator.cxx) + SOURCE_FILES(SRCS + cmDSWWriter.cxx + cmDSPWriter.cxx + cmMSProjectGenerator.cxx + cmBorlandMakefileGenerator.cxx + cmNMakeMakefileGenerator.cxx + cmMSDotNETGenerator.cxx + cmDSWWriter.cxx + cmDSPWriter.h + cmMSProjectGenerator.h + cmBorlandMakefileGenerator.h + cmNMakeMakefileGenerator.h + cmMSDotNETGenerator.h + ) IF(NOT UNIX) IF( NOT BORLAND ) LINK_LIBRARIES( rpcrt4.lib ) @@ -57,7 +83,7 @@ IF (UNIX) ENDIF (CURSES_LIBRARY) ENDIF (UNIX) -SOURCE_FILES(SRCS cmUnixMakefileGenerator.cxx) +SOURCE_FILES(SRCS cmUnixMakefileGenerator.cxx cmUnixMakefileGenerator.h) # create a library used by the command line and the GUI diff --git a/Source/cmAuxSourceDirectoryCommand.cxx b/Source/cmAuxSourceDirectoryCommand.cxx index 17ccff0..ad79acd 100644 --- a/Source/cmAuxSourceDirectoryCommand.cxx +++ b/Source/cmAuxSourceDirectoryCommand.cxx @@ -35,8 +35,8 @@ bool cmAuxSourceDirectoryCommand::InitialPass(std::vector<std::string> const& ar cmDirectory dir; if(dir.Load(tdir.c_str())) { - int numfiles = dir.GetNumberOfFiles(); - for(int i =0; i < numfiles; ++i) + size_t numfiles = dir.GetNumberOfFiles(); + for(size_t i =0; i < numfiles; ++i) { std::string file = dir.GetFile(i); // Split the filename into base and extension diff --git a/Source/cmCableClassSet.cxx b/Source/cmCableClassSet.cxx index 47f8fa1..b8fcd38 100644 --- a/Source/cmCableClassSet.cxx +++ b/Source/cmCableClassSet.cxx @@ -86,7 +86,7 @@ void cmCableClassSet::AddSource(const char* name) /** * Get the size of the internal CableClassMap used to store the set. */ -unsigned int cmCableClassSet::Size() const +size_t cmCableClassSet::Size() const { return m_CableClassMap.size(); } diff --git a/Source/cmCableClassSet.h b/Source/cmCableClassSet.h index cba0d32..3f3f613 100644 --- a/Source/cmCableClassSet.h +++ b/Source/cmCableClassSet.h @@ -70,7 +70,7 @@ public: void AddClass(const char*, cmCableClass*); void AddSource(const char* name); - unsigned int Size() const; + size_t Size() const; CableClassMap::const_iterator Begin() const; CableClassMap::const_iterator End() const; diff --git a/Source/cmDirectory.cxx b/Source/cmDirectory.cxx index c8691a5..9b4d03b 100644 --- a/Source/cmDirectory.cxx +++ b/Source/cmDirectory.cxx @@ -39,7 +39,7 @@ cmDirectory ::Load(const char* name) { char* buf; - int n = strlen(name); + size_t n = strlen(name); if ( name[n - 1] == '/' ) { buf = new char[n + 1 + 1]; @@ -53,7 +53,7 @@ cmDirectory struct _finddata_t data; // data of current file // Now put them into the file array - long srchHandle = _findfirst(buf, &data); + size_t srchHandle = _findfirst(buf, &data); delete [] buf; if ( srchHandle == -1 ) @@ -109,7 +109,7 @@ cmDirectory */ const char* cmDirectory -::GetFile(unsigned int index) +::GetFile(size_t index) { if ( index >= m_Files.size() ) { diff --git a/Source/cmDirectory.h b/Source/cmDirectory.h index ec8a9b7..de5420d 100644 --- a/Source/cmDirectory.h +++ b/Source/cmDirectory.h @@ -42,12 +42,12 @@ public: /** * Return the number of files in the current directory. */ - std::vector<std::string>::size_type GetNumberOfFiles() { return m_Files.size();} + size_t GetNumberOfFiles() { return m_Files.size();} /** * Return the file at the given index, the indexing is 0 based */ - const char* GetFile(unsigned int index); + const char* GetFile(size_t ); private: std::vector<std::string> m_Files; // Array of Files diff --git a/Source/cmFLTKWrapUICommand.cxx b/Source/cmFLTKWrapUICommand.cxx index d164907..f78a1ff 100644 --- a/Source/cmFLTKWrapUICommand.cxx +++ b/Source/cmFLTKWrapUICommand.cxx @@ -101,14 +101,14 @@ void cmFLTKWrapUICommand::FinalPass() { // first we add the rules for all the .fl to .h and .cxx files - int lastHeadersClass = m_GeneratedHeadersClasses.size(); + size_t lastHeadersClass = m_GeneratedHeadersClasses.size(); std::string fluid_exe = "${FLTK_FLUID_EXE}"; std::string outputGUIDirectory = m_Makefile->GetCurrentOutputDirectory(); // Generate code for all the .fl files - for(int classNum = 0; classNum < lastHeadersClass; classNum++) + for(size_t classNum = 0; classNum < lastHeadersClass; classNum++) { // set up .fl to .h and .cxx command std::string hres = outputGUIDirectory; diff --git a/Source/cmFindFileCommand.cxx b/Source/cmFindFileCommand.cxx index 6ef0cbf..0e40997 100644 --- a/Source/cmFindFileCommand.cxx +++ b/Source/cmFindFileCommand.cxx @@ -30,7 +30,7 @@ bool cmFindFileCommand::InitialPass(std::vector<std::string> const& argsIn) } std::string helpString = "Where can the "; helpString += argsIn[1] + " file be found"; - unsigned int size = argsIn.size(); + size_t size = argsIn.size(); std::vector<std::string> args; for(unsigned int j = 0; j < size; ++j) { diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index e3f3b12..9368ff6 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -26,7 +26,7 @@ bool cmFindLibraryCommand::InitialPass(std::vector<std::string> const& argsIn) return false; } std::string helpString; - unsigned int size = argsIn.size(); + size_t size = argsIn.size(); std::vector<std::string> args; for(unsigned int j = 0; j < size; ++j) { diff --git a/Source/cmFindPathCommand.cxx b/Source/cmFindPathCommand.cxx index a3c7dae..0de6502 100644 --- a/Source/cmFindPathCommand.cxx +++ b/Source/cmFindPathCommand.cxx @@ -31,7 +31,7 @@ bool cmFindPathCommand::InitialPass(std::vector<std::string> const& argsIn) std::string helpString = "What is the path where the file "; helpString += argsIn[1] + " can be found"; std::vector<std::string> args; - unsigned int size = argsIn.size(); + size_t size = argsIn.size(); for(unsigned int j = 0; j < size; ++j) { if(argsIn[j] != "DOC") diff --git a/Source/cmFindProgramCommand.cxx b/Source/cmFindProgramCommand.cxx index 4fc2759..f614ed5 100644 --- a/Source/cmFindProgramCommand.cxx +++ b/Source/cmFindProgramCommand.cxx @@ -29,7 +29,7 @@ bool cmFindProgramCommand::InitialPass(std::vector<std::string> const& argsIn) return false; } std::string doc = "Path to a program."; - unsigned int size = argsIn.size(); + size_t size = argsIn.size(); std::vector<std::string> args; for(unsigned int j = 0; j < size; ++j) { diff --git a/Source/cmMSDotNETGenerator.cxx b/Source/cmMSDotNETGenerator.cxx index f47b822..fb6921c 100644 --- a/Source/cmMSDotNETGenerator.cxx +++ b/Source/cmMSDotNETGenerator.cxx @@ -360,7 +360,7 @@ void cmMSDotNETGenerator::WriteProject(std::ostream& fout, const char* dspname, const char* dir, cmMSDotNETGenerator*, - const cmTarget& target + const cmTarget& ) { std::string d = cmSystemTools::ConvertToOutputPath(dir); @@ -377,7 +377,7 @@ void cmMSDotNETGenerator::WriteProject(std::ostream& fout, // the libraries it uses are also done here void cmMSDotNETGenerator::WriteProjectDepends(std::ostream& fout, const char* dspname, - const char* dir, + const char* , cmMSDotNETGenerator*, const cmTarget& target ) @@ -441,10 +441,10 @@ void cmMSDotNETGenerator::WriteProjectConfigurations(std::ostream& fout, const c // Write a dsp file into the SLN file, // Note, that dependencies from executables to // the libraries it uses are also done here -void cmMSDotNETGenerator::WriteExternalProject(std::ostream& fout, - const char* name, - const char* location, - const std::vector<std::string>& dependencies) +void cmMSDotNETGenerator::WriteExternalProject(std::ostream& , + const char* , + const char* , + const std::vector<std::string>& ) { cmSystemTools::Error("WriteExternalProject not implemented"); // fout << "#########################################################" @@ -907,9 +907,9 @@ void cmMSDotNETGenerator::OutputModuleDefinitionFile(std::ostream& fout, } void cmMSDotNETGenerator::OutputLibraryDirectories(std::ostream& fout, - const char* configName, - const char* libName, - const cmTarget &target) + const char*, + const char*, + const cmTarget &) { bool hasone = false; if(m_LibraryOutputPath.size()) @@ -1197,7 +1197,7 @@ void cmMSDotNETGenerator::WriteCustomRule(std::ostream& fout, void cmMSDotNETGenerator::WriteVCProjBeginGroup(std::ostream& fout, const char* group, - const char* filter) + const char* ) { fout << "\t\t<Filter\n" << "\t\t\tName=\"" << group << "\"\n" @@ -1288,7 +1288,7 @@ void cmMSDotNETGenerator::OutputTargetRules(std::ostream& fout, } void cmMSDotNETGenerator::WriteProjectStart(std::ostream& fout, const char *libName, - const cmTarget &target, + const cmTarget &, std::vector<cmSourceGroup> &) { fout << "<?xml version=\"1.0\" encoding = \"Windows-1252\"?>\n" diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 95a0658..b3947bc 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -322,8 +322,8 @@ bool cmMakefile::ReadListFile(const char* filename, const char* external) } // add this list file to the list of dependencies m_ListFiles.push_back( filenametoread); - const int numberFunctions = lf->m_Functions.size(); - for(int i =0; i < numberFunctions; ++i) + const size_t numberFunctions = lf->m_Functions.size(); + for(size_t i =0; i < numberFunctions; ++i) { cmListFileFunction& curFunction = lf->m_Functions[i]; if(!this->IsFunctionBlocked(curFunction.m_Name.c_str(), diff --git a/Source/cmNMakeMakefileGenerator.cxx b/Source/cmNMakeMakefileGenerator.cxx index aad3fbf..5cf1385 100644 --- a/Source/cmNMakeMakefileGenerator.cxx +++ b/Source/cmNMakeMakefileGenerator.cxx @@ -54,7 +54,7 @@ std::string cmNMakeMakefileGenerator::ShortPath(const char* path) // if there are spaces then call GetShortPathName to get rid of them char *buffer = new char[strlen(path)+1]; if(GetShortPathName(path, buffer, - strlen(path)+1) != 0) + static_cast<int>(strlen(path)+1)) != 0) { ret = buffer; } diff --git a/Source/cmQTWrapCPPCommand.cxx b/Source/cmQTWrapCPPCommand.cxx index 9db2bcd..8a1a044 100644 --- a/Source/cmQTWrapCPPCommand.cxx +++ b/Source/cmQTWrapCPPCommand.cxx @@ -89,7 +89,7 @@ void cmQTWrapCPPCommand::FinalPass() { // first we add the rules for all the .h to Moc files - int lastClass = m_WrapClasses.size(); + size_t lastClass = m_WrapClasses.size(); std::vector<std::string> depends; std::string moc_exe = "${QT_MOC_EXE}"; @@ -105,7 +105,7 @@ void cmQTWrapCPPCommand::FinalPass() moc_list=moc_list+GENERATED_QT_FILES_value; } - for(int classNum = 0; classNum < lastClass; classNum++) + for(size_t classNum = 0; classNum < lastClass; classNum++) { // Add output to build list m_Makefile->AddSource(m_WrapClasses[classNum],m_SourceList.c_str()); diff --git a/Source/cmQTWrapUICommand.cxx b/Source/cmQTWrapUICommand.cxx index f00302d..4dc651a 100644 --- a/Source/cmQTWrapUICommand.cxx +++ b/Source/cmQTWrapUICommand.cxx @@ -111,7 +111,7 @@ void cmQTWrapUICommand::FinalPass() { // first we add the rules for all the .ui to .h and .cxx files - int lastHeadersClass = m_WrapHeadersClasses.size(); + size_t lastHeadersClass = m_WrapHeadersClasses.size(); std::vector<std::string> depends; std::string uic_exe = "${QT_UIC_EXE}"; std::string moc_exe = "${QT_MOC_EXE}"; @@ -128,7 +128,7 @@ void cmQTWrapUICommand::FinalPass() ui_list=ui_list+GENERATED_QT_FILES_value; } - for(int classNum = 0; classNum < lastHeadersClass; classNum++) + for(size_t classNum = 0; classNum < lastHeadersClass; classNum++) { // set up .ui to .h and .cxx command diff --git a/Source/cmRegularExpression.cxx b/Source/cmRegularExpression.cxx index c5e7720..69798b4 100644 --- a/Source/cmRegularExpression.cxx +++ b/Source/cmRegularExpression.cxx @@ -376,7 +376,7 @@ void cmRegularExpression::compile (const char* exp) { for (; scan != NULL; scan = regnext(scan)) if (OP(scan) == EXACTLY && strlen(OPERAND(scan)) >= len) { longest = OPERAND(scan); - len = strlen(OPERAND(scan)); + len = int(strlen(OPERAND(scan))); } this->regmust = longest; this->regmlen = len; @@ -675,7 +675,7 @@ static char* regatom (int *flagp) { register char ender; regparse--; - len = strcspn(regparse, META); + len = int(strcspn(regparse, META)); if (len <= 0) { //RAISE Error, SYM(cmRegularExpression), SYM(Internal_Error), printf ("cmRegularExpression::compile(): Internal error.\n"); @@ -784,9 +784,9 @@ static void regtail (char* p, const char* val) { } if (OP(scan) == BACK) - offset = (const char*)scan - val; + offset = int(scan - val); else - offset = val - scan; + offset = int(val - scan); *(scan + 1) = (offset >> 8) & 0377; *(scan + 2) = offset & 0377; } @@ -969,7 +969,7 @@ static int regmatch (const char* prog) { // Inline the first character, for speed. if (*opnd != *reginput) return (0); - len = strlen(opnd); + len = int(strlen(opnd)); if (len > 1 && strncmp(opnd, reginput, len) != 0) return (0); reginput += len; @@ -1128,7 +1128,7 @@ static int regrepeat (const char* p) { opnd = OPERAND(p); switch (OP(p)) { case ANY: - count = strlen(scan); + count = int(strlen(scan)); scan += count; break; case EXACTLY: diff --git a/Source/cmSourceGroup.cxx b/Source/cmSourceGroup.cxx index 27041d5..b168a7c 100644 --- a/Source/cmSourceGroup.cxx +++ b/Source/cmSourceGroup.cxx @@ -122,8 +122,10 @@ void cmSourceGroup::Print() const std::cout << "FullCommand: " << j->first.c_str() << "\n"; std::cout << "Command: " << j->second.m_Command.c_str() << "\n"; std::cout << "Arguments: " << j->second.m_Arguments.c_str() << "\n"; - std::cout << "Command Outputs " << j->second.m_Outputs.size() << "\n"; - std::cout << "Command Depends " << j->second.m_Depends.size() << "\n"; + std::cout << "Command Outputs " + << static_cast<int>(j->second.m_Outputs.size()) << "\n"; + std::cout << "Command Depends " + << static_cast<int>(j->second.m_Depends.size()) << "\n"; } } } diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index a7c68d3..e2d184b 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -637,7 +637,7 @@ void cmSystemTools::GetArguments(std::string& line, while(!done) { std::string arg; - unsigned int endpos; + std::string::size_type endpos; bool foundQuoted = quotedArgument.find(line.c_str()); bool foundNormal = normalArgument.find(line.c_str()); @@ -1427,7 +1427,8 @@ void cmSystemTools::Glob(const char *directory, const char *regexp, if (d.Load(directory)) { - unsigned int i, numf; + size_t numf; + unsigned int i; numf = d.GetNumberOfFiles(); for (i = 0; i < numf; i++) { diff --git a/Source/cmVTKMakeInstantiatorCommand.cxx b/Source/cmVTKMakeInstantiatorCommand.cxx index 5e4e0c7..4c69a95 100644 --- a/Source/cmVTKMakeInstantiatorCommand.cxx +++ b/Source/cmVTKMakeInstantiatorCommand.cxx @@ -174,10 +174,10 @@ cmVTKMakeInstantiatorCommand m_Makefile->AddSource(file, outSourceList.c_str()); } - unsigned int numClasses = m_Classes.size(); - unsigned int numFullBlocks = numClasses / groupSize; - unsigned int lastBlockSize = numClasses % groupSize; - unsigned int numBlocks = numFullBlocks + ((lastBlockSize>0)? 1:0); + size_t numClasses = m_Classes.size(); + size_t numFullBlocks = numClasses / groupSize; + size_t lastBlockSize = numClasses % groupSize; + size_t numBlocks = numFullBlocks + ((lastBlockSize>0)? 1:0); // Generate the files with the ::New() calls to each class. These // are done in groups to keep the translation unit size smaller. diff --git a/Source/cmVTKWrapJavaCommand.cxx b/Source/cmVTKWrapJavaCommand.cxx index 5012302..10c5b9e 100644 --- a/Source/cmVTKWrapJavaCommand.cxx +++ b/Source/cmVTKWrapJavaCommand.cxx @@ -78,7 +78,7 @@ bool cmVTKWrapJavaCommand::InitialPass(std::vector<std::string> const& args) void cmVTKWrapJavaCommand::FinalPass() { // first we add the rules for all the .h to Java.cxx files - int lastClass = m_WrapClasses.size(); + size_t lastClass = m_WrapClasses.size(); std::vector<std::string> depends; std::vector<std::string> depends2; std::vector<std::string> alldepends; @@ -98,7 +98,7 @@ void cmVTKWrapJavaCommand::FinalPass() depends.push_back(hints); depends2.push_back(hints); } - for(int classNum = 0; classNum < lastClass; classNum++) + for(size_t classNum = 0; classNum < lastClass; classNum++) { m_Makefile->AddSource(m_WrapClasses[classNum],m_SourceList.c_str()); diff --git a/Source/cmVTKWrapPythonCommand.cxx b/Source/cmVTKWrapPythonCommand.cxx index 1b32415..e1359f9 100644 --- a/Source/cmVTKWrapPythonCommand.cxx +++ b/Source/cmVTKWrapPythonCommand.cxx @@ -78,7 +78,7 @@ bool cmVTKWrapPythonCommand::InitialPass(std::vector<std::string> const& args) void cmVTKWrapPythonCommand::FinalPass() { // first we add the rules for all the .h to Python.cxx files - int lastClass = m_WrapClasses.size(); + size_t lastClass = m_WrapClasses.size(); std::vector<std::string> depends; std::string wpython = "${VTK_WRAP_PYTHON_EXE}"; std::string hints = "${VTK_WRAP_HINTS}"; @@ -105,7 +105,7 @@ void cmVTKWrapPythonCommand::FinalPass() { depends.push_back(hints); } - for(int classNum = 0; classNum < lastClass; classNum++) + for(size_t classNum = 0; classNum < lastClass; classNum++) { m_Makefile->AddSource(m_WrapClasses[classNum],m_SourceList.c_str()); std::string res = m_Makefile->GetCurrentOutputDirectory(); @@ -129,8 +129,8 @@ void cmVTKWrapPythonCommand::FinalPass() bool cmVTKWrapPythonCommand::CreateInitFile(std::string& res) { std::vector<std::string> classes; - int lastClass = m_WrapHeaders.size(); - int classNum; + size_t lastClass = m_WrapHeaders.size(); + size_t classNum; for(classNum = 0; classNum < lastClass; classNum++) { std::string cls = m_WrapHeaders[classNum]; diff --git a/Source/cmVTKWrapTclCommand.cxx b/Source/cmVTKWrapTclCommand.cxx index 18e02bf..4d5e8fc 100644 --- a/Source/cmVTKWrapTclCommand.cxx +++ b/Source/cmVTKWrapTclCommand.cxx @@ -110,7 +110,7 @@ bool cmVTKWrapTclCommand::InitialPass(std::vector<std::string> const& args) void cmVTKWrapTclCommand::FinalPass() { // first we add the rules for all the .h to Tcl.cxx files - int lastClass = m_WrapClasses.size(); + size_t lastClass = m_WrapClasses.size(); std::vector<std::string> depends; std::string wtcl = "${VTK_WRAP_TCL_EXE}"; std::string hints = "${VTK_WRAP_HINTS}"; @@ -137,7 +137,7 @@ void cmVTKWrapTclCommand::FinalPass() { depends.push_back(hints); } - for(int classNum = 0; classNum < lastClass; classNum++) + for(size_t classNum = 0; classNum < lastClass; classNum++) { m_Makefile->AddSource(m_WrapClasses[classNum],m_SourceList.c_str()); std::vector<std::string> args; @@ -165,8 +165,8 @@ bool cmVTKWrapTclCommand::CreateInitFile(std::string& res) std::string kitName = cmSystemTools::Capitalized(m_LibraryName); std::vector<std::string> classes; - int lastClass = m_WrapHeaders.size(); - int classNum; + size_t lastClass = m_WrapHeaders.size(); + size_t classNum; for(classNum = 0; classNum < lastClass; classNum++) { if (!m_WrapClasses[classNum].IsAnAbstractClass()) diff --git a/Source/cmaketest.cxx b/Source/cmaketest.cxx index 0a6a8bf..1645b7c 100644 --- a/Source/cmaketest.cxx +++ b/Source/cmaketest.cxx @@ -142,7 +142,7 @@ int main (int argc, char *argv[]) { char *buffer = new char[makeCommand.size()+1]; if(GetShortPathName(makeCommand.c_str(), buffer, - makeCommand.size()+1) != 0) + int(makeCommand.size()+1)) != 0) { makeCommand = buffer; } @@ -161,7 +161,7 @@ int main (int argc, char *argv[]) { char *buffer = new char[makeCommand.size()+1]; if(GetShortPathName(makeCommand.c_str(), buffer, - makeCommand.size()+1) != 0) + int(makeCommand.size()+1)) != 0) { makeCommand = buffer; } diff --git a/Source/ctest.cxx b/Source/ctest.cxx index e9a8e0f..563d28a 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -292,7 +292,7 @@ int main (int argc, char *argv[]) // call process directory inst.ProcessDirectory(passed, failed); - total = passed + failed.size(); + total = passed + int(failed.size()); if (total == 0) { @@ -300,7 +300,7 @@ int main (int argc, char *argv[]) } else { - float percent = passed * 100.0 / total; + float percent = passed * 100.0f / total; fprintf(stderr,"%.0f%% tests passed, %i tests failed out of %i\n", percent, failed.size(), total); if (failed.size()) @@ -314,5 +314,5 @@ int main (int argc, char *argv[]) } } - return failed.size(); + return int(failed.size()); } |