ERR: Fixed warnings (int->unsigned int and a few others).

This commit is contained in:
Brad King 2001-02-23 10:40:13 -05:00
parent 8f0ac1e9bd
commit d31ce24413
9 changed files with 45 additions and 40 deletions

View File

@ -27,7 +27,7 @@ bool cmAbstractFilesCommand::Invoke(std::vector<std::string>& args)
j != args.end(); ++j)
{
std::vector<cmClassFile>& Classes = m_Makefile->GetClasses();
for(int i = 0; i < Classes.size(); i++)
for(unsigned int i = 0; i < Classes.size(); i++)
{
if(Classes[i].m_ClassName == (*j))
{

View File

@ -38,6 +38,11 @@ public:
cmCommand()
{m_Makefile = 0; m_Enabled = true;}
/**
* Need virtual destructor to destroy real command type.
*/
virtual ~cmCommand() {}
/**
* Specify the makefile.
*/

View File

@ -1,30 +1,30 @@
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2000 National Library of Medicine
All rights reserved.
See COPYRIGHT.txt for copyright details.
=========================================================================*/
#ifndef cmCommands_h
#define cmCommands_h
#include "cmStandardIncludes.h"
class cmCommand;
/**
* Global function to return all compiled in commands.
* To add a new command edit cmCommands.cxx and add your command.
* It is up to the caller to delete the commands created by this
* call.
*/
void GetPredefinedCommands(std::list<cmCommand*>& commands);
#endif
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2000 National Library of Medicine
All rights reserved.
See COPYRIGHT.txt for copyright details.
=========================================================================*/
#ifndef cmCommands_h
#define cmCommands_h
#include "cmStandardIncludes.h"
class cmCommand;
/**
* Global function to return all compiled in commands.
* To add a new command edit cmCommands.cxx and add your command.
* It is up to the caller to delete the commands created by this
* call.
*/
void GetPredefinedCommands(std::list<cmCommand*>& commands);
#endif

View File

@ -55,7 +55,7 @@ public:
"CONFIGURE_HEADER(InputFile OutputFile)\n"
"The Input and Ouput files have to have full paths.\n"
"They can also use variables like CMAKE_BINARY_DIR,CMAKE_SOURCE_DIR.\n"
"This command is only run if configure was not used. In other\n";
"This command is only run if configure was not used. In other\n"
"words it is only run for non UNIX style builds.\n";
}

View File

@ -35,7 +35,7 @@ bool cmFindIncludeCommand::Invoke(std::vector<std::string>& args)
}
std::vector<std::string> path;
// add any user specified paths
for (int j = 2; j < args.size(); j++)
for (unsigned int j = 2; j < args.size(); j++)
{
// expand variables
std::string exp = args[j];
@ -46,7 +46,7 @@ bool cmFindIncludeCommand::Invoke(std::vector<std::string>& args)
// add the standard path
cmSystemTools::GetPath(path);
for(int k=0; k < path.size(); k++)
for(unsigned int k=0; k < path.size(); k++)
{
std::string tryPath = path[k];
tryPath += "/";

View File

@ -35,7 +35,7 @@ bool cmFindLibraryCommand::Invoke(std::vector<std::string>& args)
}
std::vector<std::string> path;
// add any user specified paths
for (int j = 2; j < args.size(); j++)
for (unsigned int j = 2; j < args.size(); j++)
{
// expand variables
std::string exp = args[j];
@ -46,7 +46,7 @@ bool cmFindLibraryCommand::Invoke(std::vector<std::string>& args)
// add the standard path
cmSystemTools::GetPath(path);
for(int k=0; k < path.size(); k++)
for(unsigned int k=0; k < path.size(); k++)
{
std::string tryPath = path[k];
tryPath += "/";

View File

@ -45,7 +45,7 @@ bool cmFindProgramCommand::Invoke(std::vector<std::string>& args)
cmSystemTools::GetPath(path);
for(; i != args.end(); ++i)
{
for(int k=0; k < path.size(); k++)
for(unsigned int k=0; k < path.size(); k++)
{
std::string tryPath = path[k];
tryPath += "/";

View File

@ -54,7 +54,7 @@ void cmMakefile::AddDefaultCommands()
cmMakefile::~cmMakefile()
{
for(int i=0; i < m_UsedCommands.size(); i++)
for(unsigned int i=0; i < m_UsedCommands.size(); i++)
{
delete m_UsedCommands[i];
}
@ -517,7 +517,7 @@ void cmMakefile::GenerateCacheOnly()
{
std::vector<cmMakefile*> makefiles;
this->FindSubDirectoryCMakeListsFiles(makefiles);
for(int i =0; i < makefiles.size(); ++i)
for(unsigned int i =0; i < makefiles.size(); ++i)
{
delete makefiles[i];
}

View File

@ -105,7 +105,7 @@ void cmUnixMakefileGenerator::OutputDependLibraries(std::ostream& fout)
{
std::vector<std::string>& libs = m_Makefile->GetLinkLibraries();
std::vector<std::string>& libdirs = m_Makefile->GetLinkDirectories();
std::vector<std::string>::iterator dir, lib, endlibs, enddirs;
std::vector<std::string>::iterator dir, lib;
// Search the list of libraries that will be linked into
// the executable
for(lib = libs.begin(); lib != libs.end(); ++lib)