diff options
author | Brad King <brad.king@kitware.com> | 2002-06-18 21:20:27 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2002-06-18 21:20:27 (GMT) |
commit | 28895b0f9f83d52f7a4e412888f93f0dd1920f76 (patch) | |
tree | 3ecfd16930f5b282d7837e93c0a71ce42a3cca1c /Source | |
parent | 55f3a3817e2879ad988df4473490823f803025d6 (diff) | |
download | CMake-28895b0f9f83d52f7a4e412888f93f0dd1920f76.zip CMake-28895b0f9f83d52f7a4e412888f93f0dd1920f76.tar.gz CMake-28895b0f9f83d52f7a4e412888f93f0dd1920f76.tar.bz2 |
ERR: Fixed compiler warnings.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmEnableTestingCommand.h | 3 | ||||
-rw-r--r-- | Source/cmFunctionBlocker.h | 10 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 8 | ||||
-rw-r--r-- | Source/cmSystemTools.cxx | 43 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 1 |
5 files changed, 40 insertions, 25 deletions
diff --git a/Source/cmEnableTestingCommand.h b/Source/cmEnableTestingCommand.h index 47fe0a8..54297bb 100644 --- a/Source/cmEnableTestingCommand.h +++ b/Source/cmEnableTestingCommand.h @@ -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 diff --git a/Source/cmFunctionBlocker.h b/Source/cmFunctionBlocker.h index ab6f09d..3285a16 100644 --- a/Source/cmFunctionBlocker.h +++ b/Source/cmFunctionBlocker.h @@ -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() {} diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 3afce3d..ade3a90 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -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(); diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 4b69597..fef551f 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -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: " diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index ee5071d..bbb861c 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -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 |