ERR: Fixed compiler warnings.

This commit is contained in:
Brad King 2002-06-18 17:20:27 -04:00
parent 55f3a3817e
commit 28895b0f9f
5 changed files with 40 additions and 25 deletions

View File

@ -54,8 +54,7 @@ public:
* This is called when the command is first encountered in
* the CMakeLists.txt file.
*/
virtual bool InitialPass(std::vector<std::string> const& args) {
return true;};
virtual bool InitialPass(std::vector<std::string> const&) {return true;}
/**
* This is called at the end after all the information

View File

@ -32,22 +32,22 @@ public:
* should a function be blocked
*/
virtual bool IsFunctionBlocked(const char *name, const std::vector<std::string> &args,
cmMakefile &mf) = 0;
cmMakefile&mf) = 0;
/**
* should this function blocker be removed, useful when one function adds a
* blocker and another must remove it
*/
virtual bool ShouldRemove(const char *name,
const std::vector<std::string> &args,
cmMakefile &mf) {return false;}
virtual bool ShouldRemove(const char *,
const std::vector<std::string>&,
cmMakefile&) {return false;}
/**
* When the end of a CMakeList file is reached this method is called. It
* is not called on the end of an INCLUDE cmake file, just at the end of a
* regular CMakeList file
*/
virtual void ScopeEnded(cmMakefile &mf) {}
virtual void ScopeEnded(cmMakefile&) {}
virtual ~cmFunctionBlocker() {}

View File

@ -662,10 +662,10 @@ void cmMakefile::AddGlobalLinkInformation(const char* name, cmTarget& target)
// for these targets do not add anything
switch(target.GetType())
{
case cmTarget::UTILITY:
case cmTarget::INSTALL_FILES:
case cmTarget::INSTALL_PROGRAMS:
return;
case cmTarget::UTILITY: return;
case cmTarget::INSTALL_FILES: return;
case cmTarget::INSTALL_PROGRAMS: return;
default:;
}
std::vector<std::string>::iterator j;
for(j = m_LinkDirectories.begin();

View File

@ -203,9 +203,9 @@ void cmSystemTools::ReplaceString(std::string& source,
// HKEY_LOCAL_MACHINE\SOFTWARE\Scriptics\Tcl\8.4;Root
// => will return the data of the "Root" value of the key
#if defined(_WIN32) && !defined(__CYGWIN__)
bool cmSystemTools::ReadRegistryValue(const char *key, std::string &value)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
std::string primary = key;
std::string second;
@ -276,9 +276,14 @@ bool cmSystemTools::ReadRegistryValue(const char *key, std::string &value)
}
}
}
#endif
return false;
}
#else
bool cmSystemTools::ReadRegistryValue(const char *, std::string &)
{
return false;
}
#endif
// Write a registry value.
@ -288,10 +293,9 @@ bool cmSystemTools::ReadRegistryValue(const char *key, std::string &value)
// HKEY_LOCAL_MACHINE\SOFTWARE\Scriptics\Tcl\8.4;Root
// => will set the data of the "Root" value of the key
#if defined(_WIN32) && !defined(__CYGWIN__)
bool cmSystemTools::WriteRegistryValue(const char *key, const char *value)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
std::string primary = key;
std::string second;
std::string valuename;
@ -357,10 +361,14 @@ bool cmSystemTools::WriteRegistryValue(const char *key, const char *value)
{
return true;
}
#endif
return false;
}
#else
bool cmSystemTools::WriteRegistryValue(const char *, const char *)
{
return false;
}
#endif
// Delete a registry value.
// Example :
@ -369,10 +377,9 @@ bool cmSystemTools::WriteRegistryValue(const char *key, const char *value)
// HKEY_LOCAL_MACHINE\SOFTWARE\Scriptics\Tcl\8.4;Root
// => will delete the data of the "Root" value of the key
#if defined(_WIN32) && !defined(__CYGWIN__)
bool cmSystemTools::DeleteRegistryValue(const char *key)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
std::string primary = key;
std::string second;
std::string valuename;
@ -431,16 +438,20 @@ bool cmSystemTools::DeleteRegistryValue(const char *key)
return true;
}
}
#endif
return false;
}
#else
bool cmSystemTools::DeleteRegistryValue(const char *)
{
return false;
}
#endif
// replace replace with with as many times as it shows up in source.
// write the result into source.
#if defined(_WIN32) && !defined(__CYGWIN__)
void cmSystemTools::ExpandRegistryValues(std::string& source)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
// Regular expression to match anything inside [...] that begins in HKEY.
// Note that there is a special rule for regular expressions to match a
// close square-bracket inside a list delimited by square brackets.
@ -468,8 +479,12 @@ void cmSystemTools::ExpandRegistryValues(std::string& source)
cmSystemTools::ReplaceString(source, reg.c_str(), "/registry");
}
}
#endif
}
#else
void cmSystemTools::ExpandRegistryValues(std::string&)
{
}
#endif
std::string cmSystemTools::EscapeQuotes(const char* str)
@ -1050,8 +1065,8 @@ bool cmSystemTools::FilesDiffer(const char* source,
finSource.read(source_buf, statSource.st_size);
finDestination.read(dest_buf, statSource.st_size);
if(statSource.st_size != finSource.gcount() ||
statSource.st_size != finDestination.gcount())
if(statSource.st_size != static_cast<long>(finSource.gcount()) ||
statSource.st_size != static_cast<long>(finDestination.gcount()))
{
std::strstream msg;
msg << "FilesDiffer failed to read files (allocated: "

View File

@ -128,6 +128,7 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf,
"optimized", "Library is used for debug links only",
cmCacheManager::STATIC);
break;
case cmTarget::GENERAL: break;
}
}
// Add the explicit dependency information for this target. This is