1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fix missing prototypes warnings

This commit is contained in:
ed 2021-08-16 12:20:13 +01:00
parent 6f8c464747
commit c799b56b60
3 changed files with 15 additions and 5 deletions

View file

@ -183,7 +183,8 @@ namespace build_tools
cpp << newLine cpp << newLine
<< 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; << "{" << newLine;
StringArray returnCodes; StringArray returnCodes;
@ -216,7 +217,8 @@ namespace build_tools
cpp << "};" << newLine << newLine; 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 << "{" << newLine
<< " for (unsigned int i = 0; i < (sizeof (namedResourceList) / sizeof (namedResourceList[0])); ++i)" << newLine << " for (unsigned int i = 0; i < (sizeof (namedResourceList) / sizeof (namedResourceList[0])); ++i)" << newLine
<< " {" << newLine << " {" << newLine

View file

@ -101,12 +101,16 @@ public:
#if JUCE_IOS #if JUCE_IOS
#define JUCE_CREATE_APPLICATION_DEFINE(AppClass) \ #define JUCE_CREATE_APPLICATION_DEFINE(AppClass) \
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wmissing-prototypes") \
juce::JUCEApplicationBase* juce_CreateApplication() { return new AppClass(); } \ 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) \ #define JUCE_CREATE_APPLICATION_DEFINE_CUSTOM_DELEGATE(AppClass, DelegateClass) \
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wmissing-prototypes") \
juce::JUCEApplicationBase* juce_CreateApplication() { return new AppClass(); } \ 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 \ #define JUCE_MAIN_FUNCTION_DEFINITION \
extern "C" JUCE_MAIN_FUNCTION \ extern "C" JUCE_MAIN_FUNCTION \

View file

@ -118,7 +118,7 @@ namespace juce
/* Returns true if this process is in the foreground, or if the viewComponent /* Returns true if this process is in the foreground, or if the viewComponent
is embedded into a window owned by the foreground process. is embedded into a window owned by the foreground process.
*/ */
bool isForegroundOrEmbeddedProcess (Component* viewComponent) static bool isForegroundOrEmbeddedProcess (Component* viewComponent)
{ {
return Process::isForegroundProcess() || isEmbeddedInForegroundProcess (viewComponent); return Process::isForegroundProcess() || isEmbeddedInForegroundProcess (viewComponent);
} }
@ -261,6 +261,8 @@ namespace juce
static const juce::Identifier disableAsyncLayerBackedViewIdentifier { "disableAsyncLayerBackedView" }; static const juce::Identifier disableAsyncLayerBackedViewIdentifier { "disableAsyncLayerBackedView" };
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wmissing-prototypes")
/** Used by the macOS and iOS peers. */ /** Used by the macOS and iOS peers. */
void setComponentAsyncLayerBackedViewDisabled (juce::Component& comp, bool shouldDisableAsyncLayerBackedView) void setComponentAsyncLayerBackedViewDisabled (juce::Component& comp, bool shouldDisableAsyncLayerBackedView)
{ {
@ -273,6 +275,8 @@ bool getComponentAsyncLayerBackedViewDisabled (juce::Component& comp)
return comp.getProperties()[disableAsyncLayerBackedViewIdentifier]; return comp.getProperties()[disableAsyncLayerBackedViewIdentifier];
} }
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
} // namespace juce } // namespace juce
#if JUCE_MAC || JUCE_IOS #if JUCE_MAC || JUCE_IOS