summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-06-14 11:34:48 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-06-14 11:35:20 (GMT)
commitc1957df97a722698e9fbb9258e5387695049032f (patch)
treec7e590be21417a3e97b041114a64c16feeeed654
parent6207937a7864dde142180b6df847bd06aaaf85f0 (diff)
parentbeb07cdda7d291db9cac7e4bb6bf0d1c84601143 (diff)
downloadCMake-c1957df97a722698e9fbb9258e5387695049032f.zip
CMake-c1957df97a722698e9fbb9258e5387695049032f.tar.gz
CMake-c1957df97a722698e9fbb9258e5387695049032f.tar.bz2
Merge topic 'lcc-warnings' into release-3.24
beb07cdda7 Source: Convince LCC that RAII variables are used Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7357
-rw-r--r--Source/cmLoadCommandCommand.cxx6
-rw-r--r--Source/cmQtAutoMocUic.cxx4
2 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx
index 2080b40..1f18ff2 100644
--- a/Source/cmLoadCommandCommand.cxx
+++ b/Source/cmLoadCommandCommand.cxx
@@ -91,7 +91,7 @@ struct LoadedCommandImpl : cmLoadedCommandInfo
{
if (this->Destructor) {
SignalHandlerGuard guard(this->Name);
-#if defined(__NVCOMPILER)
+#if defined(__NVCOMPILER) || defined(__LCC__)
static_cast<void>(guard); // convince compiler var is used
#endif
this->Destructor(this);
@@ -107,7 +107,7 @@ struct LoadedCommandImpl : cmLoadedCommandInfo
int DoInitialPass(cmMakefile* mf, int argc, char* argv[])
{
SignalHandlerGuard guard(this->Name);
-#if defined(__NVCOMPILER)
+#if defined(__NVCOMPILER) || defined(__LCC__)
static_cast<void>(guard); // convince compiler var is used
#endif
return this->InitialPass(this, mf, argc, argv);
@@ -116,7 +116,7 @@ struct LoadedCommandImpl : cmLoadedCommandInfo
void DoFinalPass(cmMakefile* mf)
{
SignalHandlerGuard guard(this->Name);
-#if defined(__NVCOMPILER)
+#if defined(__NVCOMPILER) || defined(__LCC__)
static_cast<void>(guard); // convince compiler var is used
#endif
this->FinalPass(this, mf);
diff --git a/Source/cmQtAutoMocUic.cxx b/Source/cmQtAutoMocUic.cxx
index 6e8ada1..a7125b1 100644
--- a/Source/cmQtAutoMocUic.cxx
+++ b/Source/cmQtAutoMocUic.cxx
@@ -2789,7 +2789,7 @@ void cmQtAutoMocUicT::CreateParseJobs(SourceFileMapT const& sourceMap)
std::string cmQtAutoMocUicT::CollapseFullPathTS(std::string const& path) const
{
std::lock_guard<std::mutex> guard(this->CMakeLibMutex_);
-#if defined(__NVCOMPILER)
+#if defined(__NVCOMPILER) || defined(__LCC__)
static_cast<void>(guard); // convince compiler var is used
#endif
return cmSystemTools::CollapseFullPath(path,
@@ -3031,7 +3031,7 @@ std::vector<std::string> cmQtAutoMocUicT::dependenciesFromDepFile(
const char* filePath)
{
std::lock_guard<std::mutex> guard(this->CMakeLibMutex_);
-#if defined(__NVCOMPILER)
+#if defined(__NVCOMPILER) || defined(__LCC__)
static_cast<void>(guard); // convince compiler var is used
#endif
auto const content = cmReadGccDepfile(filePath);