From 8d671dd94c44e8b11b4619da8f3985835bcdaa66 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Thu, 21 Oct 2021 12:40:51 -0400 Subject: Source: fix more -Wmissing-prototypes warnings --- Source/CTest/cmCTestBZR.cxx | 6 +++--- Source/cmELF.cxx | 3 --- Source/cmGeneratorExpressionNode.cxx | 3 ++- Source/cmLoadCommandCommand.cxx | 1 + 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Source/CTest/cmCTestBZR.cxx b/Source/CTest/cmCTestBZR.cxx index a353435..0fe4ff4 100644 --- a/Source/CTest/cmCTestBZR.cxx +++ b/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, diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index 843ea97..66f1733 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -26,9 +26,6 @@ template struct cmELFByteSwapSize { }; -void cmELFByteSwap(char* /*unused*/, cmELFByteSwapSize<1> /*unused*/) -{ -} static void cmELFByteSwap(char* data, cmELFByteSwapSize<2> /*unused*/) { char one_byte; diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index fda088c..396e9c9 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -814,7 +814,8 @@ struct PlatformIdNode : public cmGeneratorExpressionNode } return "0"; } -} platformIdNode; +}; +static struct PlatformIdNode platformIdNode; template struct VersionNode : public cmGeneratorExpressionNode diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx index 2456db9..2080b40 100644 --- a/Source/cmLoadCommandCommand.cxx +++ b/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", -- cgit v0.12