浏览代码

Source: fix more -Wmissing-prototypes warnings

Sean McBride 4 年之前
父节点
当前提交
8d671dd94c
共有 4 个文件被更改,包括 6 次插入7 次删除
  1. 3 3
      Source/CTest/cmCTestBZR.cxx
  2. 0 3
      Source/cmELF.cxx
  3. 2 1
      Source/cmGeneratorExpressionNode.cxx
  4. 1 0
      Source/cmLoadCommandCommand.cxx

+ 3 - 3
Source/CTest/cmCTestBZR.cxx

@@ -20,9 +20,9 @@
 #include "cmSystemTools.h"
 #include "cmXMLParser.h"
 
-extern "C" int cmBZRXMLParserUnknownEncodingHandler(void* /*unused*/,
-                                                    const XML_Char* name,
-                                                    XML_Encoding* info)
+static int cmBZRXMLParserUnknownEncodingHandler(void* /*unused*/,
+                                                const XML_Char* name,
+                                                XML_Encoding* info)
 {
   static const int latin1[] = {
     0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008,

+ 0 - 3
Source/cmELF.cxx

@@ -26,9 +26,6 @@ template <size_t s>
 struct cmELFByteSwapSize
 {
 };
-void cmELFByteSwap(char* /*unused*/, cmELFByteSwapSize<1> /*unused*/)
-{
-}
 static void cmELFByteSwap(char* data, cmELFByteSwapSize<2> /*unused*/)
 {
   char one_byte;

+ 2 - 1
Source/cmGeneratorExpressionNode.cxx

@@ -814,7 +814,8 @@ struct PlatformIdNode : public cmGeneratorExpressionNode
     }
     return "0";
   }
-} platformIdNode;
+};
+static struct PlatformIdNode platformIdNode;
 
 template <cmSystemTools::CompareOp Op>
 struct VersionNode : public cmGeneratorExpressionNode

+ 1 - 0
Source/cmLoadCommandCommand.cxx

@@ -44,6 +44,7 @@ namespace {
 
 const char* LastName = nullptr;
 
+extern "C" void TrapsForSignals(int sig);
 extern "C" void TrapsForSignals(int sig)
 {
   fprintf(stderr, "CMake loaded command %s crashed with signal: %d.\n",