Browse Source

Added some prototype function definitions to avoid compiler warnings for people who enable the "missing prototype" flag

tags/2021-05-28
jules 7 years ago
parent
commit
2fcb8fa71b
11 changed files with 20 additions and 17 deletions
  1. +1
    -1
      modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp
  2. +5
    -5
      modules/juce_audio_formats/codecs/flac/libFLAC/stream_encoder.c
  3. +1
    -1
      modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp
  4. +2
    -2
      modules/juce_core/misc/juce_StdFunctionCompat.cpp
  5. +1
    -2
      modules/juce_core/text/juce_String.cpp
  6. +1
    -1
      modules/juce_graphics/fonts/juce_Font.cpp
  7. +3
    -1
      modules/juce_graphics/native/juce_mac_IconHelpers.cpp
  8. +1
    -1
      modules/juce_gui_basics/misc/juce_JUCESplashScreen.cpp
  9. +2
    -2
      modules/juce_gui_basics/native/juce_mac_MainMenu.mm
  10. +2
    -1
      modules/juce_gui_basics/native/juce_mac_Windowing.mm
  11. +1
    -0
      modules/juce_gui_basics/native/juce_win32_Windowing.cpp

+ 1
- 1
modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp View File

@@ -69,7 +69,7 @@ namespace CoreMidiHelpers
return result;
}
void enableSimulatorMidiSession()
static void enableSimulatorMidiSession()
{
#if TARGET_OS_SIMULATOR
static bool hasEnabledNetworkSession = false;


+ 5
- 5
modules/juce_audio_formats/codecs/flac/libFLAC/stream_encoder.c View File

@@ -1527,7 +1527,7 @@ FLAC_API FLAC__bool FLAC__stream_encoder_set_streamable_subset(FLAC__StreamEncod
return true;
}
FLAC_API FLAC__bool FLAC__stream_encoder_set_do_md5(FLAC__StreamEncoder *encoder, FLAC__bool value)
inline FLAC_API FLAC__bool FLAC__stream_encoder_set_do_md5(FLAC__StreamEncoder *encoder, FLAC__bool value)
{
FLAC__ASSERT(0 != encoder);
FLAC__ASSERT(0 != encoder->private_);
@@ -1896,7 +1896,7 @@ FLAC_API FLAC__bool FLAC__stream_encoder_set_metadata(FLAC__StreamEncoder *encod
* These three functions are not static, but not publically exposed in
* include/FLAC/ either. They are used by the test suite.
*/
FLAC_API FLAC__bool FLAC__stream_encoder_disable_constant_subframes(FLAC__StreamEncoder *encoder, FLAC__bool value)
inline FLAC_API FLAC__bool FLAC__stream_encoder_disable_constant_subframes(FLAC__StreamEncoder *encoder, FLAC__bool value)
{
FLAC__ASSERT(0 != encoder);
FLAC__ASSERT(0 != encoder->private_);
@@ -1907,7 +1907,7 @@ FLAC_API FLAC__bool FLAC__stream_encoder_disable_constant_subframes(FLAC__Stream
return true;
}
FLAC_API FLAC__bool FLAC__stream_encoder_disable_fixed_subframes(FLAC__StreamEncoder *encoder, FLAC__bool value)
inline FLAC_API FLAC__bool FLAC__stream_encoder_disable_fixed_subframes(FLAC__StreamEncoder *encoder, FLAC__bool value)
{
FLAC__ASSERT(0 != encoder);
FLAC__ASSERT(0 != encoder->private_);
@@ -1918,7 +1918,7 @@ FLAC_API FLAC__bool FLAC__stream_encoder_disable_fixed_subframes(FLAC__StreamEnc
return true;
}
FLAC_API FLAC__bool FLAC__stream_encoder_disable_verbatim_subframes(FLAC__StreamEncoder *encoder, FLAC__bool value)
inline FLAC_API FLAC__bool FLAC__stream_encoder_disable_verbatim_subframes(FLAC__StreamEncoder *encoder, FLAC__bool value)
{
FLAC__ASSERT(0 != encoder);
FLAC__ASSERT(0 != encoder->private_);
@@ -1994,7 +1994,7 @@ FLAC_API FLAC__bool FLAC__stream_encoder_get_streamable_subset(const FLAC__Strea
return encoder->protected_->streamable_subset;
}
FLAC_API FLAC__bool FLAC__stream_encoder_get_do_md5(const FLAC__StreamEncoder *encoder)
inline FLAC_API FLAC__bool FLAC__stream_encoder_get_do_md5(const FLAC__StreamEncoder *encoder)
{
FLAC__ASSERT(0 != encoder);
FLAC__ASSERT(0 != encoder->private_);


+ 1
- 1
modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp View File

@@ -232,7 +232,7 @@ namespace WavFileHelpers
} JUCE_PACKED;
//==============================================================================
AudioChannelSet canonicalWavChannelSet (int numChannels)
inline AudioChannelSet canonicalWavChannelSet (int numChannels)
{
if (numChannels == 1) return AudioChannelSet::mono();
if (numChannels == 2) return AudioChannelSet::stereo();


+ 2
- 2
modules/juce_core/misc/juce_StdFunctionCompat.cpp View File

@@ -35,8 +35,8 @@ namespace juce
namespace FunctionTestsHelpers
{
void incrementArgument (int& x) { x++; }
double multiply (double x, double a) noexcept { return a * x; }
static void incrementArgument (int& x) { x++; }
static double multiply (double x, double a) noexcept { return a * x; }
struct BigData
{


+ 1
- 2
modules/juce_core/text/juce_String.cpp View File

@@ -864,7 +864,6 @@ JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, StringRef s2)
JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, uint8 number) { return s1 += (int) number; }
JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const short number) { return s1 += (int) number; }
JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const int number) { return s1 += number; }
JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const unsigned short number) { return s1 += (uint64) number; }
JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const long number) { return s1 += String (number); }
JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const unsigned long number) { return s1 += String (number); }
JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const int64 number) { return s1 += String (number); }
@@ -879,7 +878,7 @@ JUCE_API OutputStream& JUCE_CALLTYPE operator<< (OutputStream& stream, const Str
JUCE_API OutputStream& JUCE_CALLTYPE operator<< (OutputStream& stream, StringRef text)
{
const size_t numBytes = CharPointer_UTF8::getBytesRequiredFor (text.text);
auto numBytes = CharPointer_UTF8::getBytesRequiredFor (text.text);
#if (JUCE_STRING_UTF_TYPE == 8)
stream.write (text.text.getAddress(), numBytes);


+ 1
- 1
modules/juce_graphics/fonts/juce_Font.cpp View File

@@ -326,7 +326,7 @@ struct FontPlaceholderNames
regular { "<Regular>" };
};
const FontPlaceholderNames& getFontPlaceholderNames()
static const FontPlaceholderNames& getFontPlaceholderNames()
{
static FontPlaceholderNames names;
return names;


+ 3
- 1
modules/juce_graphics/native/juce_mac_IconHelpers.cpp View File

@@ -27,7 +27,9 @@
namespace juce
{
Image getIconFromIcnsFile (const File& icnsFile, const int size)
extern Image JUCE_API getIconFromApplication (const String&, int);
static Image getIconFromIcnsFile (const File& icnsFile, const int size)
{
FileInputStream stream (icnsFile);


+ 1
- 1
modules/juce_gui_basics/misc/juce_JUCESplashScreen.cpp View File

@@ -59,7 +59,7 @@ static uint32 splashDisplayTime = 0;
static bool appUsageReported = false;
Rectangle<float> getLogoArea (Rectangle<float> parentRect)
static Rectangle<float> getLogoArea (Rectangle<float> parentRect)
{
return parentRect.reduced (6.0f)
.removeFromRight ((float) splashScreenLogoWidth)


+ 2
- 2
modules/juce_gui_basics/native/juce_mac_MainMenu.mm View File

@@ -787,8 +787,8 @@ void juce_initialiseMacMainMenu()
}
// (used from other modules that need to create an NSMenu)
NSMenu* createNSMenu (const PopupMenu& menu, const String& name,
int topLevelMenuId, int topLevelIndex, bool addDelegate)
NSMenu* createNSMenu (const PopupMenu&, const String&, int, int, bool);
NSMenu* createNSMenu (const PopupMenu& menu, const String& name, int topLevelMenuId, int topLevelIndex, bool addDelegate)
{
juce_initialiseMacMainMenu();


+ 2
- 1
modules/juce_gui_basics/native/juce_mac_Windowing.mm View File

@@ -164,7 +164,7 @@ static NSRect getDragRect (NSView* view, NSEvent* event)
fromView: nil];
}
NSView* getNSViewForDragEvent (Component* sourceComp)
static NSView* getNSViewForDragEvent (Component* sourceComp)
{
if (sourceComp == nullptr)
if (auto* draggingSource = Desktop::getInstance().getDraggingMouseSource(0))
@@ -558,6 +558,7 @@ static Image createNSWindowSnapshot (NSWindow* nsWindow)
}
}
Image createSnapshotOfNativeWindow (void*);
Image createSnapshotOfNativeWindow (void* nativeWindowHandle)
{
if (id windowOrView = (id) nativeWindowHandle)


+ 1
- 0
modules/juce_gui_basics/native/juce_win32_Windowing.cpp View File

@@ -617,6 +617,7 @@ private:
};
//==============================================================================
Image createSnapshotOfNativeWindow (void*);
Image createSnapshotOfNativeWindow (void* nativeWindowHandle)
{
auto hwnd = (HWND) nativeWindowHandle;


Loading…
Cancel
Save