diff options
author | Brad King <brad.king@kitware.com> | 2022-06-13 15:07:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-06-13 15:07:35 (GMT) |
commit | beb07cdda7d291db9cac7e4bb6bf0d1c84601143 (patch) | |
tree | ce892a03bccd75c0b26f032992dba38e8af1039d /Source | |
parent | 7116712771538be9f093b6ae7f4ef5ce38fc3679 (diff) | |
download | CMake-beb07cdda7d291db9cac7e4bb6bf0d1c84601143.zip CMake-beb07cdda7d291db9cac7e4bb6bf0d1c84601143.tar.gz CMake-beb07cdda7d291db9cac7e4bb6bf0d1c84601143.tar.bz2 |
Source: Convince LCC that RAII variables are used
Extend the change from commit 5ad8862318 (Source: Convince NVHPC that
RAII variables are used, 2021-04-26, v3.21.0-rc1~254^2~1) to apply to
LCC too.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLoadCommandCommand.cxx | 6 | ||||
-rw-r--r-- | Source/cmQtAutoMocUic.cxx | 4 |
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); |