From 9199fa3c5179a7d8c3a443e4068bfb1a901b62b8 Mon Sep 17 00:00:00 2001 From: reuk Date: Thu, 12 Aug 2021 15:58:09 +0100 Subject: [PATCH] Warnings: Avoid triggering missing-prototypes warnings on macOS/iOS --- modules/juce_audio_devices/native/juce_ios_Audio.cpp | 4 ++++ modules/juce_events/messages/juce_Initialisation.h | 4 +++- modules/juce_gui_basics/windows/juce_AlertWindow.cpp | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/juce_audio_devices/native/juce_ios_Audio.cpp b/modules/juce_audio_devices/native/juce_ios_Audio.cpp index ab3224afdd..fd649ee2e0 100644 --- a/modules/juce_audio_devices/native/juce_ios_Audio.cpp +++ b/modules/juce_audio_devices/native/juce_ios_Audio.cpp @@ -64,6 +64,8 @@ static const char* getRoutingChangeReason (AVAudioSessionRouteChangeReason reaso } } +JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wmissing-prototypes") + bool getNotificationValueForKey (NSNotification* notification, NSString* key, NSUInteger& value) noexcept { if (notification != nil) @@ -82,6 +84,8 @@ bool getNotificationValueForKey (NSNotification* notification, NSString* key, NS return false; } +JUCE_END_IGNORE_WARNINGS_GCC_LIKE + } // namespace juce //============================================================================== diff --git a/modules/juce_events/messages/juce_Initialisation.h b/modules/juce_events/messages/juce_Initialisation.h index 066904a513..bcfaf21e85 100644 --- a/modules/juce_events/messages/juce_Initialisation.h +++ b/modules/juce_events/messages/juce_Initialisation.h @@ -157,8 +157,10 @@ public: #else #define START_JUCE_APPLICATION(AppClass) \ + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wmissing-prototypes") \ JUCE_CREATE_APPLICATION_DEFINE(AppClass) \ - JUCE_MAIN_FUNCTION_DEFINITION + JUCE_MAIN_FUNCTION_DEFINITION \ + JUCE_END_IGNORE_WARNINGS_GCC_LIKE #if JUCE_IOS /** diff --git a/modules/juce_gui_basics/windows/juce_AlertWindow.cpp b/modules/juce_gui_basics/windows/juce_AlertWindow.cpp index 991476ea61..0c8a7f493f 100644 --- a/modules/juce_gui_basics/windows/juce_AlertWindow.cpp +++ b/modules/juce_gui_basics/windows/juce_AlertWindow.cpp @@ -649,6 +649,7 @@ namespace AlertWindowMappings return rawToUniquePtr (ModalCallbackFunction::create (std::move (wrappedCallback))); } + } #if JUCE_MODAL_LOOPS_PERMITTED