diff --git a/modules/juce_audio_devices/native/juce_android_Audio.cpp b/modules/juce_audio_devices/native/juce_android_Audio.cpp index 31d4f62545..e21f9468d6 100644 --- a/modules/juce_audio_devices/native/juce_android_Audio.cpp +++ b/modules/juce_audio_devices/native/juce_android_Audio.cpp @@ -77,8 +77,8 @@ public: numClientInputChannels (0), numDeviceInputChannels (0), numDeviceInputChannelsAvailable (2), numClientOutputChannels (0), numDeviceOutputChannels (0), actualBufferSize (0), isRunning (false), - outputChannelBuffer (1, 1), - inputChannelBuffer (1, 1) + inputChannelBuffer (1, 1), + outputChannelBuffer (1, 1) { JNIEnv* env = getEnv(); sampleRate = env->CallStaticIntMethod (AudioTrack, AudioTrack.getNativeOutputSampleRate, MODE_STREAM); diff --git a/modules/juce_core/native/juce_android_Files.cpp b/modules/juce_core/native/juce_android_Files.cpp index 15f90886d7..d5ed94500f 100644 --- a/modules/juce_core/native/juce_android_Files.cpp +++ b/modules/juce_core/native/juce_android_Files.cpp @@ -234,6 +234,7 @@ bool Process::openDocument (const String& fileName, const String& parameters) { const LocalRef t (javaString (fileName)); android.activity.callVoidMethod (JuceAppActivity.launchURL, t.get()); + return true; } void File::revealToUser() const diff --git a/modules/juce_core/native/juce_android_Misc.cpp b/modules/juce_core/native/juce_android_Misc.cpp index b9d5f733ca..d26adc185e 100644 --- a/modules/juce_core/native/juce_android_Misc.cpp +++ b/modules/juce_core/native/juce_android_Misc.cpp @@ -28,5 +28,5 @@ void Logger::outputDebugString (const String& text) { - __android_log_print (ANDROID_LOG_INFO, "JUCE", text.toUTF8()); + __android_log_print (ANDROID_LOG_INFO, "JUCE", "%s", text.toUTF8().getAddress()); } diff --git a/modules/juce_core/network/juce_IPAddress.cpp b/modules/juce_core/network/juce_IPAddress.cpp index 0a7bd41f76..5fc1b00dc3 100644 --- a/modules/juce_core/network/juce_IPAddress.cpp +++ b/modules/juce_core/network/juce_IPAddress.cpp @@ -126,7 +126,7 @@ static void findIPAddresses (int sock, Array& result) cfg.ifc_buf += IFNAMSIZ + cfg.ifc_req->ifr_addr.sa_len; } #else - for (int i = 0; i < cfg.ifc_len / sizeof (struct ifreq); ++i) + for (size_t i = 0; i < cfg.ifc_len / sizeof (struct ifreq); ++i) { const ifreq& item = cfg.ifc_req[i]; diff --git a/modules/juce_core/threads/juce_Thread.cpp b/modules/juce_core/threads/juce_Thread.cpp index 20d25398d8..8f8709d091 100644 --- a/modules/juce_core/threads/juce_Thread.cpp +++ b/modules/juce_core/threads/juce_Thread.cpp @@ -65,10 +65,15 @@ struct CurrentThreadHolder : public ReferenceCountedObject static char currentThreadHolderLock [sizeof (SpinLock)]; // (statically initialised to zeros). +static SpinLock* castToSpinLockWithoutAliasingWarning (void* s) +{ + return static_cast (s); +} + static CurrentThreadHolder::Ptr getCurrentThreadHolder() { static CurrentThreadHolder::Ptr currentThreadHolder; - SpinLock::ScopedLockType lock (*reinterpret_cast (currentThreadHolderLock)); + SpinLock::ScopedLockType lock (*castToSpinLockWithoutAliasingWarning (currentThreadHolderLock)); if (currentThreadHolder == nullptr) currentThreadHolder = new CurrentThreadHolder(); diff --git a/modules/juce_gui_basics/native/juce_android_Windowing.cpp b/modules/juce_gui_basics/native/juce_android_Windowing.cpp index 060f322eda..3a0b057ef6 100644 --- a/modules/juce_gui_basics/native/juce_android_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_android_Windowing.cpp @@ -697,7 +697,6 @@ JUCE_JNI_CALLBACK (JUCE_ANDROID_ACTIVITY_CLASSNAME, setScreenSize, void, (JNIEnv jint screenWidth, jint screenHeight, jint dpi)) { - const bool isSystemInitialised = android.screenWidth != 0; android.screenWidth = screenWidth; android.screenHeight = screenHeight; android.dpi = dpi; diff --git a/modules/juce_gui_extra/misc/juce_ColourSelector.cpp b/modules/juce_gui_extra/misc/juce_ColourSelector.cpp index 4f6f3f2b58..04a68f182b 100644 --- a/modules/juce_gui_extra/misc/juce_ColourSelector.cpp +++ b/modules/juce_gui_extra/misc/juce_ColourSelector.cpp @@ -193,8 +193,8 @@ private: class ColourSelector::HueSelectorComp : public Component { public: - HueSelectorComp (ColourSelector& cs, float& hue, float& sat, float& val, const int edgeSize) - : owner (cs), h (hue), s (sat), v (val), edge (edgeSize) + HueSelectorComp (ColourSelector& cs, float& hue, const int edgeSize) + : owner (cs), h (hue), edge (edgeSize) { addAndMakeVisible (&marker); } @@ -236,8 +236,6 @@ public: private: ColourSelector& owner; float& h; - float& s; - float& v; HueSelectorMarker marker; const int edge; @@ -332,7 +330,7 @@ ColourSelector::ColourSelector (const int sectionsToShow, const int edge, const if ((flags & showColourspace) != 0) { addAndMakeVisible (colourSpace = new ColourSpaceView (*this, h, s, v, gapAroundColourSpaceComponent)); - addAndMakeVisible (hueSelector = new HueSelectorComp (*this, h, s, v, gapAroundColourSpaceComponent)); + addAndMakeVisible (hueSelector = new HueSelectorComp (*this, h, gapAroundColourSpaceComponent)); } update();