From c799b56b60b27067f9d6814cf0cb26a447bca0e6 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 16 Aug 2021 12:20:13 +0100 Subject: [PATCH] Fix missing prototypes warnings --- .../juce_build_tools/utils/juce_BinaryResourceFile.cpp | 6 ++++-- modules/juce_events/messages/juce_Initialisation.h | 8 ++++++-- modules/juce_gui_basics/juce_gui_basics.cpp | 6 +++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/extras/Build/juce_build_tools/utils/juce_BinaryResourceFile.cpp b/extras/Build/juce_build_tools/utils/juce_BinaryResourceFile.cpp index fa9c3f2eac..04d68f12d8 100644 --- a/extras/Build/juce_build_tools/utils/juce_BinaryResourceFile.cpp +++ b/extras/Build/juce_build_tools/utils/juce_BinaryResourceFile.cpp @@ -183,7 +183,8 @@ namespace build_tools cpp << newLine << newLine - << "const char* getNamedResource (const char* resourceNameUTF8, int& numBytes)" << newLine + << "const char* getNamedResource (const char* resourceNameUTF8, int& numBytes);" << newLine + << "const char* getNamedResource (const char* resourceNameUTF8, int& numBytes)" << newLine << "{" << newLine; StringArray returnCodes; @@ -216,7 +217,8 @@ namespace build_tools cpp << "};" << newLine << newLine; - cpp << "const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8)" << newLine + cpp << "const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8);" << newLine + << "const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8)" << newLine << "{" << newLine << " for (unsigned int i = 0; i < (sizeof (namedResourceList) / sizeof (namedResourceList[0])); ++i)" << newLine << " {" << newLine diff --git a/modules/juce_events/messages/juce_Initialisation.h b/modules/juce_events/messages/juce_Initialisation.h index 4977b443d0..066904a513 100644 --- a/modules/juce_events/messages/juce_Initialisation.h +++ b/modules/juce_events/messages/juce_Initialisation.h @@ -101,12 +101,16 @@ public: #if JUCE_IOS #define JUCE_CREATE_APPLICATION_DEFINE(AppClass) \ + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wmissing-prototypes") \ juce::JUCEApplicationBase* juce_CreateApplication() { return new AppClass(); } \ - void* juce_GetIOSCustomDelegateClass() { return nullptr; } + void* juce_GetIOSCustomDelegateClass() { return nullptr; } \ + JUCE_END_IGNORE_WARNINGS_GCC_LIKE #define JUCE_CREATE_APPLICATION_DEFINE_CUSTOM_DELEGATE(AppClass, DelegateClass) \ + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wmissing-prototypes") \ juce::JUCEApplicationBase* juce_CreateApplication() { return new AppClass(); } \ - void* juce_GetIOSCustomDelegateClass() { return [DelegateClass class]; } + void* juce_GetIOSCustomDelegateClass() { return [DelegateClass class]; } \ + JUCE_END_IGNORE_WARNINGS_GCC_LIKE #define JUCE_MAIN_FUNCTION_DEFINITION \ extern "C" JUCE_MAIN_FUNCTION \ diff --git a/modules/juce_gui_basics/juce_gui_basics.cpp b/modules/juce_gui_basics/juce_gui_basics.cpp index 4b16414581..cba268cf19 100644 --- a/modules/juce_gui_basics/juce_gui_basics.cpp +++ b/modules/juce_gui_basics/juce_gui_basics.cpp @@ -118,7 +118,7 @@ namespace juce /* Returns true if this process is in the foreground, or if the viewComponent is embedded into a window owned by the foreground process. */ - bool isForegroundOrEmbeddedProcess (Component* viewComponent) + static bool isForegroundOrEmbeddedProcess (Component* viewComponent) { return Process::isForegroundProcess() || isEmbeddedInForegroundProcess (viewComponent); } @@ -261,6 +261,8 @@ namespace juce static const juce::Identifier disableAsyncLayerBackedViewIdentifier { "disableAsyncLayerBackedView" }; +JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wmissing-prototypes") + /** Used by the macOS and iOS peers. */ void setComponentAsyncLayerBackedViewDisabled (juce::Component& comp, bool shouldDisableAsyncLayerBackedView) { @@ -273,6 +275,8 @@ bool getComponentAsyncLayerBackedViewDisabled (juce::Component& comp) return comp.getProperties()[disableAsyncLayerBackedViewIdentifier]; } +JUCE_END_IGNORE_WARNINGS_GCC_LIKE + } // namespace juce #if JUCE_MAC || JUCE_IOS