Browse Source

Source: Fix clang -Wextra-semi warnings

Sean McBride 4 years ago
parent
commit
907d098838

+ 1 - 1
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

+ 1 - 1
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

+ 2 - 2
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 {

+ 1 - 1
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;

+ 1 - 1
Source/cmLocalUnixMakefileGenerator3.h

@@ -299,7 +299,7 @@ private:
     cmGeneratorTarget const* target)
   {
     return this->CommandsVisited[target];
-  };
+  }
 
   std::map<cmGeneratorTarget const*, std::set<cmSourceFile const*>>
     CommandsVisited;

+ 1 - 1
Source/cmMakefileProfilingData.cxx

@@ -29,7 +29,7 @@ cmMakefileProfilingData::cmMakefileProfilingData(
   }
 
   this->ProfileStream << "[";
-};
+}
 
 cmMakefileProfilingData::~cmMakefileProfilingData() noexcept
 {

+ 1 - 1
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)

+ 1 - 1
Source/cmQtAutoGenGlobalInitializer.h

@@ -49,7 +49,7 @@ public:
     std::vector<std::unique_ptr<cmLocalGenerator>> const& localGenerators);
   ~cmQtAutoGenGlobalInitializer();
 
-  Keywords const& kw() const { return this->Keywords_; };
+  Keywords const& kw() const { return this->Keywords_; }
 
   bool generate();
 

+ 12 - 4
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<std::string, std::vector<std::string>>;
 
     UicT()
-      : GenVarsT(GenT::UIC){};
+      : GenVarsT(GenT::UIC)
+    {
+    }
 
     std::set<std::string> SkipUi;
     std::vector<std::string> UiFilesNoOptions;
@@ -252,7 +258,9 @@ private:
   struct RccT : public GenVarsT
   {
     RccT()
-      : GenVarsT(GenT::RCC){};
+      : GenVarsT(GenT::RCC)
+    {
+    }
 
     bool GlobalTarget = false;
     std::vector<Qrc> Qrcs;

+ 2 - 2
Source/cmQtAutoMocUic.cxx

@@ -310,7 +310,7 @@ public:
     cmQtAutoMocUicT* Gen() const
     {
       return static_cast<cmQtAutoMocUicT*>(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.  */

+ 1 - 1
Source/cmStringCommand.cxx

@@ -1054,7 +1054,7 @@ Json::Value& ResolvePath(Json::Value& json, Args path)
     }
   }
   return *search;
-};
+}
 
 Json::Value ReadJson(const std::string& jsonstr)
 {

+ 1 - 1
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
 

+ 2 - 2
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 {}
   };
 
   /**

+ 3 - 3
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)
 {