summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorMatthias Maennich <matthias@maennich.net>2017-09-19 21:58:08 (GMT)
committerBrad King <brad.king@kitware.com>2017-09-28 11:23:42 (GMT)
commitb5d7f5b0e8490a66cdd603e0ee38890426b3b6c4 (patch)
treeceb8024fee98ce8185b0a9a133be46e86e949493 /Source
parent9a2da3395034844fb91998005d9c7db648492c6b (diff)
downloadCMake-b5d7f5b0e8490a66cdd603e0ee38890426b3b6c4.zip
CMake-b5d7f5b0e8490a66cdd603e0ee38890426b3b6c4.tar.gz
CMake-b5d7f5b0e8490a66cdd603e0ee38890426b3b6c4.tar.bz2
Fix occurrences of readability-non-const-parameter
Fix issues diagnosed by clang-tidy [readability-non-const-parameter] The patch separates the definitions of the function headers for the two variants (CMAKE_USE_ELF_PARSER or not) and comments out the parameter names to not consider them for any const-ness in the case they are actually not even looked at. Signed-off-by: Matthias Maennich <matthias@maennich.net>
Diffstat (limited to 'Source')
-rw-r--r--Source/cmSystemTools.cxx26
1 files changed, 14 insertions, 12 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 26073d3..63c1452 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -2326,12 +2326,12 @@ struct cmSystemToolsRPathInfo
};
#endif
+#if defined(CMAKE_USE_ELF_PARSER)
bool cmSystemTools::ChangeRPath(std::string const& file,
std::string const& oldRPath,
std::string const& newRPath, std::string* emsg,
bool* changed)
{
-#if defined(CMAKE_USE_ELF_PARSER)
if (changed) {
*changed = false;
}
@@ -2497,15 +2497,16 @@ bool cmSystemTools::ChangeRPath(std::string const& file,
*changed = true;
}
return true;
+}
#else
- (void)file;
- (void)oldRPath;
- (void)newRPath;
- (void)emsg;
- (void)changed;
+bool cmSystemTools::ChangeRPath(std::string const& /*file*/,
+ std::string const& /*oldRPath*/,
+ std::string const& /*newRPath*/,
+ std::string* /*emsg*/, bool* /*changed*/)
+{
return false;
-#endif
}
+#endif
bool cmSystemTools::VersionCompare(cmSystemTools::CompareOp op,
const char* lhss, const char* rhss)
@@ -2639,10 +2640,10 @@ int cmSystemTools::strverscmp(std::string const& lhs, std::string const& rhs)
return cm_strverscmp(lhs.c_str(), rhs.c_str());
}
+#if defined(CMAKE_USE_ELF_PARSER)
bool cmSystemTools::RemoveRPath(std::string const& file, std::string* emsg,
bool* removed)
{
-#if defined(CMAKE_USE_ELF_PARSER)
if (removed) {
*removed = false;
}
@@ -2780,13 +2781,14 @@ bool cmSystemTools::RemoveRPath(std::string const& file, std::string* emsg,
*removed = true;
}
return true;
+}
#else
- (void)file;
- (void)emsg;
- (void)removed;
+bool cmSystemTools::RemoveRPath(std::string const& /*file*/,
+ std::string* /*emsg*/, bool* /*removed*/)
+{
return false;
-#endif
}
+#endif
bool cmSystemTools::CheckRPath(std::string const& file,
std::string const& newRPath)