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.
This commit is contained in:
Brad King
2022-06-13 11:07:35 -04:00
parent 7116712771
commit beb07cdda7
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -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);