summaryrefslogtreecommitdiffstats
path: root/Source/cmLoadCommandCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-04-29 13:21:14 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-04-29 13:21:37 (GMT)
commite2ac92681c85ecd52069852415c17e05649b989a (patch)
tree1e84de55778703eca674e14100dc4547e3f57127 /Source/cmLoadCommandCommand.cxx
parentc4f8c823582aa207059ee43126ec88e678ac1284 (diff)
parentf881b4e4ccbab9aa7f3af3c610a72ad0422e90f9 (diff)
downloadCMake-e2ac92681c85ecd52069852415c17e05649b989a.zip
CMake-e2ac92681c85ecd52069852415c17e05649b989a.tar.gz
CMake-e2ac92681c85ecd52069852415c17e05649b989a.tar.bz2
Merge topic 'nvhpc-warnings'
f881b4e4cc cmCPackDebGenerator: Remove unused local variable 5ad8862318 Source: Convince NVHPC that RAII variables are used 1898f9dd82 cmFileCommand: Remove unused local variable 6a003c6f35 cmSystemTools: Avoid unreachable code warning on NVHPC 16275c7f82 LexerParser: Suppress NVHPC warnings in generated code cefda16d35 LexerParser: Regenerate parsers with bison 3.7.5 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6049
Diffstat (limited to 'Source/cmLoadCommandCommand.cxx')
-rw-r--r--Source/cmLoadCommandCommand.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx
index 2981ef8..2456db9 100644
--- a/Source/cmLoadCommandCommand.cxx
+++ b/Source/cmLoadCommandCommand.cxx
@@ -90,6 +90,9 @@ struct LoadedCommandImpl : cmLoadedCommandInfo
{
if (this->Destructor) {
SignalHandlerGuard guard(this->Name);
+#if defined(__NVCOMPILER)
+ static_cast<void>(guard); // convince compiler var is used
+#endif
this->Destructor(this);
}
if (this->Error != nullptr) {
@@ -103,12 +106,18 @@ struct LoadedCommandImpl : cmLoadedCommandInfo
int DoInitialPass(cmMakefile* mf, int argc, char* argv[])
{
SignalHandlerGuard guard(this->Name);
+#if defined(__NVCOMPILER)
+ static_cast<void>(guard); // convince compiler var is used
+#endif
return this->InitialPass(this, mf, argc, argv);
}
void DoFinalPass(cmMakefile* mf)
{
SignalHandlerGuard guard(this->Name);
+#if defined(__NVCOMPILER)
+ static_cast<void>(guard); // convince compiler var is used
+#endif
this->FinalPass(this, mf);
}
};