From 907d098838c99ee6c0c72ae0cdf1cc53dbf51ba2 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Fri, 24 Sep 2021 11:52:11 -0400 Subject: Source: Fix clang -Wextra-semi warnings --- Source/cmCommand.h | 2 +- Source/cmConditionEvaluator.cxx | 2 +- Source/cmFindLibraryCommand.cxx | 4 ++-- Source/cmGeneratorTarget.h | 2 +- Source/cmLocalUnixMakefileGenerator3.h | 2 +- Source/cmMakefileProfilingData.cxx | 2 +- Source/cmOutputConverter.cxx | 2 +- Source/cmQtAutoGenGlobalInitializer.h | 2 +- Source/cmQtAutoGenInitializer.h | 16 ++++++++++++---- Source/cmQtAutoMocUic.cxx | 4 ++-- Source/cmStringCommand.cxx | 2 +- Source/cmUVHandlePtr.h | 2 +- Source/cmWorkerPool.h | 4 ++-- Tests/CMakeLib/testUVRAII.cxx | 6 +++--- 14 files changed, 30 insertions(+), 22 deletions(-) diff --git a/Source/cmCommand.h b/Source/cmCommand.h index 68c56d9..f5a5190 100644 --- a/Source/cmCommand.h +++ b/Source/cmCommand.h @@ -44,7 +44,7 @@ public: cmMakefile* GetMakefile() { return this->Makefile; } void SetExecutionStatus(cmExecutionStatus* s); - cmExecutionStatus* GetExecutionStatus() { return this->Status; }; + cmExecutionStatus* GetExecutionStatus() { return this->Status; } /** * This is called by the cmMakefile when the command is first diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index 913b532..cbe2a26 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -117,7 +117,7 @@ bool looksLikeSpecialVariable(const std::string& var, { \ } #else -# define CM_INHERIT_CTOR(Class, Base, Tpl) using Base Tpl ::Base; +# define CM_INHERIT_CTOR(Class, Base, Tpl) using Base Tpl ::Base #endif // BEGIN cmConditionEvaluator::cmArgumentList diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index bfa007c..ff04bab 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -247,7 +247,7 @@ struct cmFindLibraryHelper cmStrCat(this->PrefixRegexStr, name, this->SuffixRegexStr); this->DebugSearches.FailedAt(path, regexName); } - }; + } void DebugLibraryFound(std::string const& name, std::string const& path) { @@ -256,7 +256,7 @@ struct cmFindLibraryHelper cmStrCat(this->PrefixRegexStr, name, this->SuffixRegexStr); this->DebugSearches.FoundAt(path, regexName); } - }; + } }; namespace { diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index e9ce962..9906963 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -221,7 +221,7 @@ public: { this->PreviousState = target.SetDeviceLink(true); } - ~DeviceLinkSetter() { this->Target.SetDeviceLink(this->PreviousState); }; + ~DeviceLinkSetter() { this->Target.SetDeviceLink(this->PreviousState); } private: cmGeneratorTarget& Target; diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index 14dd0ba..78aa7f9 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -299,7 +299,7 @@ private: cmGeneratorTarget const* target) { return this->CommandsVisited[target]; - }; + } std::map> CommandsVisited; diff --git a/Source/cmMakefileProfilingData.cxx b/Source/cmMakefileProfilingData.cxx index 86188db..337f78b 100644 --- a/Source/cmMakefileProfilingData.cxx +++ b/Source/cmMakefileProfilingData.cxx @@ -29,7 +29,7 @@ cmMakefileProfilingData::cmMakefileProfilingData( } this->ProfileStream << "["; -}; +} cmMakefileProfilingData::~cmMakefileProfilingData() noexcept { diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index bda2fe5..2b785e1 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -19,7 +19,7 @@ bool PathEqOrSubDir(std::string const& a, std::string const& b) { return (cmSystemTools::ComparePath(a, b) || cmSystemTools::IsSubDirectory(a, b)); -}; +} } cmOutputConverter::cmOutputConverter(cmStateSnapshot const& snapshot) diff --git a/Source/cmQtAutoGenGlobalInitializer.h b/Source/cmQtAutoGenGlobalInitializer.h index afcb4a2..3de5c1a 100644 --- a/Source/cmQtAutoGenGlobalInitializer.h +++ b/Source/cmQtAutoGenGlobalInitializer.h @@ -49,7 +49,7 @@ public: std::vector> const& localGenerators); ~cmQtAutoGenGlobalInitializer(); - Keywords const& kw() const { return this->Keywords_; }; + Keywords const& kw() const { return this->Keywords_; } bool generate(); diff --git a/Source/cmQtAutoGenInitializer.h b/Source/cmQtAutoGenInitializer.h index e76817b..603c537 100644 --- a/Source/cmQtAutoGenInitializer.h +++ b/Source/cmQtAutoGenInitializer.h @@ -95,7 +95,9 @@ public: GenVarsT(GenT gen) : Gen(gen) - , GenNameUpper(cmQtAutoGen::GeneratorNameUpper(gen)){}; + , GenNameUpper(cmQtAutoGen::GeneratorNameUpper(gen)) + { + } }; /** @param mocExecutable The file path to the moc executable. Will be used as @@ -209,7 +211,9 @@ private: struct MocT : public GenVarsT { MocT() - : GenVarsT(GenT::MOC){}; + : GenVarsT(GenT::MOC) + { + } bool RelaxedMode = false; bool PathPrefix = false; @@ -237,7 +241,9 @@ private: using UiFileT = std::pair>; UicT() - : GenVarsT(GenT::UIC){}; + : GenVarsT(GenT::UIC) + { + } std::set SkipUi; std::vector UiFilesNoOptions; @@ -252,7 +258,9 @@ private: struct RccT : public GenVarsT { RccT() - : GenVarsT(GenT::RCC){}; + : GenVarsT(GenT::RCC) + { + } bool GlobalTarget = false; std::vector Qrcs; diff --git a/Source/cmQtAutoMocUic.cxx b/Source/cmQtAutoMocUic.cxx index 2753fd5..056056c 100644 --- a/Source/cmQtAutoMocUic.cxx +++ b/Source/cmQtAutoMocUic.cxx @@ -310,7 +310,7 @@ public: cmQtAutoMocUicT* Gen() const { return static_cast(this->UserData()); - }; + } // -- Accessors. Only valid during Process() call! Logger const& Log() const { return this->Gen()->Log(); } @@ -346,7 +346,7 @@ public: : JobT(true) { } - void Process() override{}; + void Process() override {} }; /** Generate moc_predefs.h. */ diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx index 1cb6193..f44fcf7 100644 --- a/Source/cmStringCommand.cxx +++ b/Source/cmStringCommand.cxx @@ -1054,7 +1054,7 @@ Json::Value& ResolvePath(Json::Value& json, Args path) } } return *search; -}; +} Json::Value ReadJson(const std::string& jsonstr) { diff --git a/Source/cmUVHandlePtr.h b/Source/cmUVHandlePtr.h index 8c5ad59..027d690 100644 --- a/Source/cmUVHandlePtr.h +++ b/Source/cmUVHandlePtr.h @@ -23,7 +23,7 @@ #else -# define CM_INHERIT_CTOR(Class, Base, Tpl) using Base Tpl ::Base; +# define CM_INHERIT_CTOR(Class, Base, Tpl) using Base Tpl ::Base #endif diff --git a/Source/cmWorkerPool.h b/Source/cmWorkerPool.h index ff25526..4035650 100644 --- a/Source/cmWorkerPool.h +++ b/Source/cmWorkerPool.h @@ -87,7 +87,7 @@ public: * Get the user data. * Only valid during the JobT::Process() call! */ - void* UserData() const { return this->Pool_->UserData(); }; + void* UserData() const { return this->Pool_->UserData(); } /** * Get the worker index. @@ -138,7 +138,7 @@ public: { } //! Does nothing - void Process() override{}; + void Process() override {} }; /** diff --git a/Tests/CMakeLib/testUVRAII.cxx b/Tests/CMakeLib/testUVRAII.cxx index 0607f44..7d21959 100644 --- a/Tests/CMakeLib/testUVRAII.cxx +++ b/Tests/CMakeLib/testUVRAII.cxx @@ -169,7 +169,7 @@ static bool testAllMoves() allTypes b(std::move(a)); allTypes c = std::move(b); return true; -}; +} static bool testLoopReset() { @@ -192,7 +192,7 @@ static bool testLoopReset() } return true; -}; +} static bool testLoopDestructor() { @@ -217,7 +217,7 @@ static bool testLoopDestructor() } return true; -}; +} int testUVRAII(int, char** const) { -- cgit v0.12