diff --git a/examples/Demo/Source/Demos/MDIDemo.cpp b/examples/Demo/Source/Demos/MDIDemo.cpp index cc060ca381..d065064511 100644 --- a/examples/Demo/Source/Demos/MDIDemo.cpp +++ b/examples/Demo/Source/Demos/MDIDemo.cpp @@ -140,6 +140,8 @@ public: #if JUCE_MODAL_LOOPS_PERMITTED if (Note* note = dynamic_cast (component)) return note->saveIfNeededAndUserAgrees() != FileBasedDocument::failedToWriteToFile; + #else + ignoreUnused (component); #endif return true; diff --git a/modules/juce_audio_devices/native/juce_android_Audio.cpp b/modules/juce_audio_devices/native/juce_android_Audio.cpp index dd4e5a452e..17ce93cc71 100644 --- a/modules/juce_audio_devices/native/juce_android_Audio.cpp +++ b/modules/juce_audio_devices/native/juce_android_Audio.cpp @@ -199,7 +199,7 @@ public: numDeviceOutputChannels = 2; outputDevice = GlobalRef (env->NewObject (AudioTrack, AudioTrack.constructor, STREAM_MUSIC, sampleRate, CHANNEL_OUT_STEREO, ENCODING_PCM_16BIT, - (jint) (minBufferSizeOut * numDeviceOutputChannels * sizeof (int16)), MODE_STREAM)); + (jint) (minBufferSizeOut * numDeviceOutputChannels * static_cast (sizeof (int16))), MODE_STREAM)); int outputDeviceState = env->CallIntMethod (outputDevice, AudioTrack.getState); if (outputDeviceState > 0) @@ -232,7 +232,7 @@ public: 0 /* (default audio source) */, sampleRate, numDeviceInputChannelsAvailable > 1 ? CHANNEL_IN_STEREO : CHANNEL_IN_MONO, ENCODING_PCM_16BIT, - (jint) (minBufferSizeIn * numDeviceInputChannels * sizeof (int16)))); + (jint) (minBufferSizeIn * numDeviceInputChannels * static_cast (sizeof (int16))))); int inputDeviceState = env->CallIntMethod (inputDevice, AudioRecord.getState); if (inputDeviceState > 0) @@ -441,9 +441,9 @@ public: //============================================================================== void scanForDevices() {} - StringArray getDeviceNames (bool wantInputNames) const { return StringArray (javaAudioTypeName); } - int getDefaultDeviceIndex (bool forInput) const { return 0; } - int getIndexOfDevice (AudioIODevice* device, bool asInput) const { return device != nullptr ? 0 : -1; } + StringArray getDeviceNames (bool) const { return StringArray (javaAudioTypeName); } + int getDefaultDeviceIndex (bool) const { return 0; } + int getIndexOfDevice (AudioIODevice* device, bool) const { return device != nullptr ? 0 : -1; } bool hasSeparateInputsAndOutputs() const { return false; } AudioIODevice* createDevice (const String& outputDeviceName, diff --git a/modules/juce_audio_devices/native/juce_android_Midi.cpp b/modules/juce_audio_devices/native/juce_android_Midi.cpp index a1f73a9979..392a0bfb69 100644 --- a/modules/juce_audio_devices/native/juce_android_Midi.cpp +++ b/modules/juce_audio_devices/native/juce_android_Midi.cpp @@ -96,8 +96,8 @@ public: jassert (byteArray != nullptr); jbyte* data = getEnv()->GetByteArrayElements (byteArray, nullptr); - HeapBlock buffer (len); - std::memcpy (buffer.getData(), data + offset, len); + HeapBlock buffer (static_cast (len)); + std::memcpy (buffer.getData(), data + offset, static_cast (len)); midiConcatenator.pushMidiData (buffer.getData(), len, static_cast (timestamp) * 1.0e-9, @@ -109,8 +109,8 @@ public: private: MidiInput* juceMidiInput; MidiInputCallback* callback; - GlobalRef javaMidiDevice; MidiDataConcatenator midiConcatenator; + GlobalRef javaMidiDevice; }; //============================================================================== @@ -144,7 +144,7 @@ private: }; JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024JuceMidiInputPort), handleReceive, - void, (JNIEnv* env, jobject device, jlong host, jbyteArray byteArray, + void, (JNIEnv* env, jobject, jlong host, jbyteArray byteArray, jint offset, jint count, jlong timestamp)) { // Java may create a Midi thread which JUCE doesn't know about and this callback may be @@ -302,7 +302,7 @@ void MidiOutput::sendMessageNow (const MidiMessage& message) jbyteArray content = messageContent.get(); jbyte* rawBytes = env->GetByteArrayElements (content, nullptr); - std::memcpy (rawBytes, message.getRawData(), messageSize); + std::memcpy (rawBytes, message.getRawData(), static_cast (messageSize)); env->ReleaseByteArrayElements (content, rawBytes, 0); androidMidi->send (content, (jint) 0, (jint) messageSize); diff --git a/modules/juce_audio_devices/native/juce_android_OpenSL.cpp b/modules/juce_audio_devices/native/juce_android_OpenSL.cpp index 60446f1017..ae2dcb6b97 100644 --- a/modules/juce_audio_devices/native/juce_android_OpenSL.cpp +++ b/modules/juce_audio_devices/native/juce_android_OpenSL.cpp @@ -393,22 +393,22 @@ private: if (engineObject != nullptr) (*engineObject)->Destroy (engineObject); } - Player* createPlayer (const int numChannels, const int sampleRate, const int numBuffers, const int bufferSize) + Player* createPlayer (const int numChannels, const int sampleRateToUse, const int numBuffers, const int bufferSize) { if (numChannels <= 0) return nullptr; - ScopedPointer player (new Player (numChannels, sampleRate, *this, numBuffers, bufferSize)); - return player->openedOk() ? player.release() : nullptr; + ScopedPointer newPlayer (new Player (numChannels, sampleRateToUse, *this, numBuffers, bufferSize)); + return newPlayer->openedOk() ? newPlayer.release() : nullptr; } - Recorder* createRecorder (const int numChannels, const int sampleRate, const int numBuffers, const int bufferSize) + Recorder* createRecorder (const int numChannels, const int sampleRateToUse, const int numBuffers, const int bufferSize) { if (numChannels <= 0) return nullptr; - ScopedPointer recorder (new Recorder (numChannels, sampleRate, *this, numBuffers, bufferSize)); - return recorder->openedOk() ? recorder.release() : nullptr; + ScopedPointer newRecorder (new Recorder (numChannels, sampleRateToUse, *this, numBuffers, bufferSize)); + return newRecorder->openedOk() ? newRecorder.release() : nullptr; } SLObjectItf engineObject; @@ -431,7 +431,7 @@ private: { BufferList (const int numChannels_, const int numBuffers_, const int numSamples_) : numChannels (numChannels_), numBuffers (numBuffers_), numSamples (numSamples_), - bufferSpace (numChannels_ * numSamples * numBuffers), nextBlock (0) + bufferSpace (static_cast (numChannels_ * numSamples * numBuffers)), nextBlock (0) { } @@ -459,7 +459,7 @@ private: void bufferReturned() noexcept { --numBlocksOut; dataArrived.signal(); } void bufferSent() noexcept { ++numBlocksOut; dataArrived.signal(); } - int getBufferSizeBytes() const noexcept { return numChannels * numSamples * sizeof (int16); } + int getBufferSizeBytes() const noexcept { return numChannels * numSamples * static_cast (sizeof (int16)); } const int numChannels, numBuffers, numSamples; @@ -473,7 +473,7 @@ private: //============================================================================== struct Player { - Player (int numChannels, int sampleRate, Engine& engine, int playerNumBuffers, int playerBufferSize) + Player (int numChannels, int playerSampleRate, Engine& slEngine, int playerNumBuffers, int playerBufferSize) : playerObject (nullptr), playerPlay (nullptr), playerBufferQueue (nullptr), bufferList (numChannels, playerNumBuffers, playerBufferSize) { @@ -481,7 +481,7 @@ private: { SL_DATAFORMAT_PCM, (SLuint32) numChannels, - (SLuint32) (sampleRate * 1000), + (SLuint32) (playerSampleRate * 1000), SL_PCMSAMPLEFORMAT_FIXED_16, SL_PCMSAMPLEFORMAT_FIXED_16, (numChannels == 1) ? SL_SPEAKER_FRONT_CENTER : (SL_SPEAKER_FRONT_LEFT | SL_SPEAKER_FRONT_RIGHT), @@ -492,19 +492,19 @@ private: static_cast (bufferList.numBuffers) }; SLDataSource audioSrc = { &bufferQueue, &pcmFormat }; - SLDataLocator_OutputMix outputMix = { SL_DATALOCATOR_OUTPUTMIX, engine.outputMixObject }; + SLDataLocator_OutputMix outputMix = { SL_DATALOCATOR_OUTPUTMIX, slEngine.outputMixObject }; SLDataSink audioSink = { &outputMix, nullptr }; // (SL_IID_BUFFERQUEUE is not guaranteed to remain future-proof, so use SL_IID_ANDROIDSIMPLEBUFFERQUEUE) - const SLInterfaceID interfaceIDs[] = { *engine.SL_IID_ANDROIDSIMPLEBUFFERQUEUE }; + const SLInterfaceID interfaceIDs[] = { *slEngine.SL_IID_ANDROIDSIMPLEBUFFERQUEUE }; const SLboolean flags[] = { SL_BOOLEAN_TRUE }; - check ((*engine.engineInterface)->CreateAudioPlayer (engine.engineInterface, &playerObject, &audioSrc, &audioSink, - 1, interfaceIDs, flags)); + check ((*slEngine.engineInterface)->CreateAudioPlayer (slEngine.engineInterface, &playerObject, &audioSrc, &audioSink, + 1, interfaceIDs, flags)); check ((*playerObject)->Realize (playerObject, SL_BOOLEAN_FALSE)); - check ((*playerObject)->GetInterface (playerObject, *engine.SL_IID_PLAY, &playerPlay)); - check ((*playerObject)->GetInterface (playerObject, *engine.SL_IID_ANDROIDSIMPLEBUFFERQUEUE, &playerBufferQueue)); + check ((*playerObject)->GetInterface (playerObject, *slEngine.SL_IID_PLAY, &playerPlay)); + check ((*playerObject)->GetInterface (playerObject, *slEngine.SL_IID_ANDROIDSIMPLEBUFFERQUEUE, &playerBufferQueue)); check ((*playerBufferQueue)->RegisterCallback (playerBufferQueue, staticCallback, this)); } @@ -572,7 +572,7 @@ private: void enqueueBuffer (int16* buffer) noexcept { - check ((*playerBufferQueue)->Enqueue (playerBufferQueue, buffer, bufferList.getBufferSizeBytes())); + check ((*playerBufferQueue)->Enqueue (playerBufferQueue, buffer, static_cast (bufferList.getBufferSizeBytes()))); bufferList.bufferSent(); } @@ -588,7 +588,7 @@ private: //============================================================================== struct Recorder { - Recorder (int numChannels, int sampleRate, Engine& engine, const int numBuffers, const int numSamples) + Recorder (int numChannels, int recorderSampleRate, Engine& slEngine, const int numBuffers, const int numSamples) : recorderObject (nullptr), recorderRecord (nullptr), recorderBufferQueue (nullptr), configObject (nullptr), bufferList (numChannels, numBuffers, numSamples) @@ -597,7 +597,7 @@ private: { SL_DATAFORMAT_PCM, (SLuint32) numChannels, - (SLuint32) (sampleRate * 1000), // (sample rate units are millihertz) + (SLuint32) (recorderSampleRate * 1000), // (sample rate units are millihertz) SL_PCMSAMPLEFORMAT_FIXED_16, SL_PCMSAMPLEFORMAT_FIXED_16, (numChannels == 1) ? SL_SPEAKER_FRONT_CENTER : (SL_SPEAKER_FRONT_LEFT | SL_SPEAKER_FRONT_RIGHT), @@ -611,19 +611,19 @@ private: static_cast (bufferList.numBuffers) }; SLDataSink audioSink = { &bufferQueue, &pcmFormat }; - const SLInterfaceID interfaceIDs[] = { *engine.SL_IID_ANDROIDSIMPLEBUFFERQUEUE }; + const SLInterfaceID interfaceIDs[] = { *slEngine.SL_IID_ANDROIDSIMPLEBUFFERQUEUE }; const SLboolean flags[] = { SL_BOOLEAN_TRUE }; - if (check ((*engine.engineInterface)->CreateAudioRecorder (engine.engineInterface, &recorderObject, &audioSrc, - &audioSink, 1, interfaceIDs, flags))) + if (check ((*slEngine.engineInterface)->CreateAudioRecorder (slEngine.engineInterface, &recorderObject, &audioSrc, + &audioSink, 1, interfaceIDs, flags))) { if (check ((*recorderObject)->Realize (recorderObject, SL_BOOLEAN_FALSE))) { - check ((*recorderObject)->GetInterface (recorderObject, *engine.SL_IID_RECORD, &recorderRecord)); - check ((*recorderObject)->GetInterface (recorderObject, *engine.SL_IID_ANDROIDSIMPLEBUFFERQUEUE, &recorderBufferQueue)); + check ((*recorderObject)->GetInterface (recorderObject, *slEngine.SL_IID_RECORD, &recorderRecord)); + check ((*recorderObject)->GetInterface (recorderObject, *slEngine.SL_IID_ANDROIDSIMPLEBUFFERQUEUE, &recorderBufferQueue)); // not all android versions seem to have a config object SLresult result = (*recorderObject)->GetInterface (recorderObject, - *engine.SL_IID_ANDROIDCONFIGURATION, &configObject); + *slEngine.SL_IID_ANDROIDCONFIGURATION, &configObject); if (result != SL_RESULT_SUCCESS) configObject = nullptr; @@ -707,7 +707,7 @@ private: void enqueueBuffer (int16* buffer) noexcept { - check ((*recorderBufferQueue)->Enqueue (recorderBufferQueue, buffer, bufferList.getBufferSizeBytes())); + check ((*recorderBufferQueue)->Enqueue (recorderBufferQueue, buffer, static_cast (bufferList.getBufferSizeBytes()))); bufferList.bufferSent(); } @@ -746,9 +746,9 @@ public: //============================================================================== void scanForDevices() override {} - StringArray getDeviceNames (bool wantInputNames) const override { return StringArray (openSLTypeName); } - int getDefaultDeviceIndex (bool forInput) const override { return 0; } - int getIndexOfDevice (AudioIODevice* device, bool asInput) const override { return device != nullptr ? 0 : -1; } + StringArray getDeviceNames (bool) const override { return StringArray (openSLTypeName); } + int getDefaultDeviceIndex (bool) const override { return 0; } + int getIndexOfDevice (AudioIODevice* device, bool) const override { return device != nullptr ? 0 : -1; } bool hasSeparateInputsAndOutputs() const override { return false; } AudioIODevice* createDevice (const String& outputDeviceName, diff --git a/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp index 0d6a748e7c..f369ea4ad3 100644 --- a/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp @@ -197,9 +197,9 @@ namespace AiffFileHelpers { static bool isValidTag (const char* d) noexcept { - return CharacterFunctions::isLetterOrDigit (d[0]) && CharacterFunctions::isUpperCase (d[0]) - && CharacterFunctions::isLetterOrDigit (d[1]) && CharacterFunctions::isLowerCase (d[1]) - && CharacterFunctions::isLetterOrDigit (d[2]) && CharacterFunctions::isLowerCase (d[2]); + return CharacterFunctions::isLetterOrDigit (d[0]) && CharacterFunctions::isUpperCase (static_cast (d[0])) + && CharacterFunctions::isLetterOrDigit (d[1]) && CharacterFunctions::isLowerCase (static_cast (d[1])) + && CharacterFunctions::isLetterOrDigit (d[2]) && CharacterFunctions::isLowerCase (static_cast (d[2])); } static bool isAppleGenre (const String& tag) noexcept diff --git a/modules/juce_audio_utils/native/juce_android_BluetoothMidiDevicePairingDialogue.cpp b/modules/juce_audio_utils/native/juce_android_BluetoothMidiDevicePairingDialogue.cpp index fa99ff2331..655d12a1b6 100644 --- a/modules/juce_audio_utils/native/juce_android_BluetoothMidiDevicePairingDialogue.cpp +++ b/modules/juce_audio_utils/native/juce_android_BluetoothMidiDevicePairingDialogue.cpp @@ -192,7 +192,7 @@ private: } void paintListBoxItem (int rowNumber, Graphics& g, - int width, int height, bool rowIsSelected) override + int width, int height, bool) override { if (isPositiveAndBelow (rowNumber, devices.size())) { @@ -210,14 +210,13 @@ private: g.setColour (getDeviceNameFontColour (device.connectionStatus)); g.drawText (device.name, - xmargin, ymargin, - deviceNameWidth - (2.0f * xmargin), height - (2.0f * ymargin), + Rectangle (xmargin, ymargin, deviceNameWidth - (2.0f * xmargin), height - (2.0f * ymargin)), Justification::topLeft, true); g.setColour (getDeviceStatusFontColour (device.connectionStatus)); g.drawText (statusString, - deviceNameWidth + xmargin, ymargin, - width - deviceNameWidth - (2.0f * xmargin), height - (2.0f * ymargin), + Rectangle (deviceNameWidth + xmargin, ymargin, + width - deviceNameWidth - (2.0f * xmargin), height - (2.0f * ymargin)), Justification::topRight, true); g.setColour (Colours::grey); @@ -439,7 +438,7 @@ bool BluetoothMidiDevicePairingDialogue::open (ModalComponentManager::Callback* return false; } - BluetoothMidiSelectorOverlay* overlay = new BluetoothMidiSelectorOverlay (exitCallback.release()); + new BluetoothMidiSelectorOverlay (exitCallback.release()); return true; } diff --git a/modules/juce_core/javascript/juce_JSON.cpp b/modules/juce_core/javascript/juce_JSON.cpp index 6fa8ec1983..a6cc163a6d 100644 --- a/modules/juce_core/javascript/juce_JSON.cpp +++ b/modules/juce_core/javascript/juce_JSON.cpp @@ -84,7 +84,7 @@ public: if (digitValue < 0) return createFail ("Syntax error in unicode escape sequence"); - c = (juce_wchar) ((c << 4) + digitValue); + c = (juce_wchar) ((c << 4) + static_cast (digitValue)); } break; diff --git a/modules/juce_core/javascript/juce_Javascript.cpp b/modules/juce_core/javascript/juce_Javascript.cpp index 719c2b47c8..089adc8524 100644 --- a/modules/juce_core/javascript/juce_Javascript.cpp +++ b/modules/juce_core/javascript/juce_Javascript.cpp @@ -1636,7 +1636,7 @@ struct JavascriptEngine::RootObject : public DynamicObject static Identifier getClassName() { static const Identifier i ("String"); return i; } - static var fromCharCode (Args a) { return String::charToString (getInt (a, 0)); } + static var fromCharCode (Args a) { return String::charToString (static_cast (getInt (a, 0))); } static var substring (Args a) { return a.thisObject.toString().substring (getInt (a, 0), getInt (a, 1)); } static var indexOf (Args a) { return a.thisObject.toString().indexOf (getString (a, 0)); } static var charCodeAt (Args a) { return (int) a.thisObject.toString() [getInt (a, 0)]; } diff --git a/modules/juce_core/native/juce_android_Files.cpp b/modules/juce_core/native/juce_android_Files.cpp index 6d5890c0e8..177a5f75b3 100644 --- a/modules/juce_core/native/juce_android_Files.cpp +++ b/modules/juce_core/native/juce_android_Files.cpp @@ -98,7 +98,7 @@ bool File::moveToTrash() const return false; } -JUCE_API bool JUCE_CALLTYPE Process::openDocument (const String& fileName, const String& parameters) +JUCE_API bool JUCE_CALLTYPE Process::openDocument (const String& fileName, const String&) { const LocalRef t (javaString (fileName)); android.activity.callVoidMethod (JuceAppActivity.launchURL, t.get()); diff --git a/modules/juce_core/native/juce_android_JNIHelpers.h b/modules/juce_core/native/juce_android_JNIHelpers.h index cb9e0769c2..2804606b5a 100644 --- a/modules/juce_core/native/juce_android_JNIHelpers.h +++ b/modules/juce_core/native/juce_android_JNIHelpers.h @@ -149,7 +149,7 @@ private: //============================================================================== namespace { - String juceString (JNIEnv* env, jstring s) + inline String juceString (JNIEnv* env, jstring s) { const char* const utf8 = env->GetStringUTFChars (s, nullptr); CharPointer_UTF8 utf8CP (utf8); @@ -158,17 +158,17 @@ namespace return result; } - String juceString (jstring s) + inline String juceString (jstring s) { return juceString (getEnv(), s); } - LocalRef javaString (const String& s) + inline LocalRef javaString (const String& s) { return LocalRef (getEnv()->NewStringUTF (s.toUTF8())); } - LocalRef javaStringFromChar (const juce_wchar c) + inline LocalRef javaStringFromChar (const juce_wchar c) { char utf8[8] = { 0 }; CharPointer_UTF8 (utf8).write (c); @@ -223,6 +223,7 @@ private: \ void initialiseFields (JNIEnv* env) \ { \ + ignoreUnused (env); \ JNI_CLASS_MEMBERS (CREATE_JNI_METHOD, CREATE_JNI_STATICMETHOD, CREATE_JNI_FIELD, CREATE_JNI_STATICFIELD); \ } \ \ diff --git a/modules/juce_core/native/juce_android_Network.cpp b/modules/juce_core/native/juce_android_Network.cpp index e7cd336047..0adfe7619b 100644 --- a/modules/juce_core/native/juce_android_Network.cpp +++ b/modules/juce_core/native/juce_android_Network.cpp @@ -50,16 +50,16 @@ DECLARE_JNI_CLASS (HTTPStream, JUCE_ANDROID_ACTIVITY_CLASSPATH "$HTTPStream"); //============================================================================== -void MACAddress::findAllAddresses (Array& result) +void MACAddress::findAllAddresses (Array& /*result*/) { // TODO } -JUCE_API bool JUCE_CALLTYPE Process::openEmailWithAttachments (const String& targetEmailAddress, - const String& emailSubject, - const String& bodyText, - const StringArray& filesToAttach) +JUCE_API bool JUCE_CALLTYPE Process::openEmailWithAttachments (const String& /*targetEmailAddress*/, + const String& /*emailSubject*/, + const String& /*bodyText*/, + const StringArray& /*filesToAttach*/) { // TODO return false; @@ -95,7 +95,7 @@ public: } } - bool connect (WebInputStream::Listener* listener) + bool connect (WebInputStream::Listener* /*listener*/) { String address = url.toString (! isPost); @@ -112,8 +112,8 @@ public: if (postData.getSize() > 0) { - postDataArray = env->NewByteArray (postData.getSize()); - env->SetByteArrayRegion (postDataArray, 0, postData.getSize(), (const jbyte*) postData.getData()); + postDataArray = env->NewByteArray (static_cast (postData.getSize())); + env->SetByteArrayRegion (postDataArray, 0, static_cast (postData.getSize()), (const jbyte*) postData.getData()); } LocalRef responseHeaderBuffer (env->NewObject (StringBuffer, StringBuffer.constructor)); diff --git a/modules/juce_core/native/juce_android_SystemStats.cpp b/modules/juce_core/native/juce_android_SystemStats.cpp index 711f422a9d..af05f7133d 100644 --- a/modules/juce_core/native/juce_android_SystemStats.cpp +++ b/modules/juce_core/native/juce_android_SystemStats.cpp @@ -275,7 +275,7 @@ uint32 juce_millisecondsSinceStartup() noexcept timespec t; clock_gettime (CLOCK_MONOTONIC, &t); - return t.tv_sec * 1000 + t.tv_nsec / 1000000; + return static_cast (t.tv_sec) * 1000U + static_cast (t.tv_nsec) / 1000000U; } int64 Time::getHighResolutionTicks() noexcept diff --git a/modules/juce_core/native/juce_android_Threads.cpp b/modules/juce_core/native/juce_android_Threads.cpp index 1145dbc42b..c7a0b73b78 100644 --- a/modules/juce_core/native/juce_android_Threads.cpp +++ b/modules/juce_core/native/juce_android_Threads.cpp @@ -98,7 +98,7 @@ void* threadEntryProc (AndroidThreadData* priv) } JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024JuceThread), runThread, - void, (JNIEnv* env, jobject device, jlong host)) + void, (JNIEnv* env, jobject /*device*/, jlong host)) { // This thread does not have a JNIEnv assigned to it yet. So assign it now. setEnv (env); diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h index 118225257b..8ada484ffa 100644 --- a/modules/juce_core/native/juce_posix_SharedCode.h +++ b/modules/juce_core/native/juce_posix_SharedCode.h @@ -219,6 +219,12 @@ bool File::setAsCurrentWorkingDirectory() const return chdir (getFullPathName().toUTF8()) == 0; } +#if JUCE_ANDROID + typedef unsigned long juce_sigactionflags_type; +#else + typedef int juce_sigactionflags_type; +#endif + //============================================================================== // The unix siginterrupt function is deprecated - this does the same job. int juce_siginterrupt (int sig, int flag) @@ -227,9 +233,9 @@ int juce_siginterrupt (int sig, int flag) (void) ::sigaction (sig, nullptr, &act); if (flag != 0) - act.sa_flags &= ~SA_RESTART; + act.sa_flags &= static_cast (~SA_RESTART); else - act.sa_flags |= SA_RESTART; + act.sa_flags |= static_cast (SA_RESTART); return ::sigaction (sig, &act, nullptr); } @@ -369,7 +375,7 @@ static bool setFileModeFlags (const String& fullPath, mode_t flags, bool shouldS else info.st_mode &= ~flags; - return chmod (fullPath.toUTF8(), info.st_mode) == 0; + return chmod (fullPath.toUTF8(), (mode_t) info.st_mode) == 0; } bool File::setFileReadOnlyInternal (bool shouldBeReadOnly) const @@ -406,8 +412,8 @@ bool File::setFileTimesInternal (int64 modificationTime, int64 accessTime, int64 if ((modificationTime != 0 || accessTime != 0) && juce_stat (fullPath, info)) { struct utimbuf times; - times.actime = accessTime != 0 ? (time_t) (accessTime / 1000) : info.st_atime; - times.modtime = modificationTime != 0 ? (time_t) (modificationTime / 1000) : info.st_mtime; + times.actime = (time_t) (accessTime != 0 ? (accessTime / 1000) : info.st_atime); + times.modtime = (time_t) (modificationTime != 0 ? (modificationTime / 1000) : info.st_mtime); return utime (fullPath.toUTF8(), ×) == 0; } @@ -455,7 +461,7 @@ Result File::createDirectoryInternal (const String& fileName) const //============================================================================== int64 juce_fileSetPosition (void* handle, int64 pos) { - if (handle != 0 && lseek (getFD (handle), pos, SEEK_SET) == pos) + if (handle != 0 && lseek (getFD (handle), (off_t) pos, SEEK_SET) == pos) return pos; return -1; diff --git a/modules/juce_core/network/juce_Socket.cpp b/modules/juce_core/network/juce_Socket.cpp index a3d1ad8517..de79625f06 100644 --- a/modules/juce_core/network/juce_Socket.cpp +++ b/modules/juce_core/network/juce_Socket.cpp @@ -39,10 +39,17 @@ #if JUCE_WINDOWS typedef int juce_socklen_t; + typedef int juce_recvsend_size_t; typedef SOCKET SocketHandle; static const SocketHandle invalidSocket = INVALID_SOCKET; +#elif JUCE_ANDROID + typedef socklen_t juce_socklen_t; + typedef size_t juce_recvsend_size_t; + typedef int SocketHandle; + static const SocketHandle invalidSocket = -1; #else typedef socklen_t juce_socklen_t; + typedef socklen_t juce_recvsend_size_t; typedef int SocketHandle; static const SocketHandle invalidSocket = -1; #endif @@ -198,7 +205,7 @@ namespace SocketHelpers { long bytesThisTime = -1; char* const buffer = static_cast (destBuffer) + bytesRead; - const juce_socklen_t numToRead = (juce_socklen_t) (maxBytesToRead - bytesRead); + const juce_recvsend_size_t numToRead = (juce_recvsend_size_t) (maxBytesToRead - bytesRead); { // avoid race-condition @@ -467,7 +474,7 @@ int StreamingSocket::write (const void* sourceBuffer, const int numBytesToWrite) if (isListener || ! connected) return -1; - return (int) ::send (handle, (const char*) sourceBuffer, (juce_socklen_t) numBytesToWrite, 0); + return (int) ::send (handle, (const char*) sourceBuffer, (juce_recvsend_size_t) numBytesToWrite, 0); } //============================================================================== @@ -730,7 +737,7 @@ int DatagramSocket::write (const String& remoteHostname, int remotePortNumber, } return (int) ::sendto (handle, (const char*) sourceBuffer, - (juce_socklen_t) numBytesToWrite, 0, + (juce_recvsend_size_t) numBytesToWrite, 0, info->ai_addr, (socklen_t) info->ai_addrlen); } @@ -752,7 +759,9 @@ bool DatagramSocket::leaveMulticast (const String& multicastIPAddress) bool DatagramSocket::setEnablePortReuse (bool enabled) { - #if ! JUCE_ANDROID + #if JUCE_ANDROID + ignoreUnused (enabled); + #else if (handle >= 0) return SocketHelpers::setOption (handle, #if JUCE_WINDOWS || JUCE_LINUX diff --git a/modules/juce_core/text/juce_CharPointer_UTF16.h b/modules/juce_core/text/juce_CharPointer_UTF16.h index 591301435a..01cd902665 100644 --- a/modules/juce_core/text/juce_CharPointer_UTF16.h +++ b/modules/juce_core/text/juce_CharPointer_UTF16.h @@ -99,7 +99,7 @@ public: /** Moves this pointer along to the next character in the string. */ CharPointer_UTF16 operator++() noexcept { - const juce_wchar n = *data++; + const juce_wchar n = static_cast (*data++); if (n >= 0xd800 && n <= 0xdfff && ((uint32) (uint16) *data) >= 0xdc00) ++data; @@ -110,7 +110,7 @@ public: /** Moves this pointer back to the previous character in the string. */ CharPointer_UTF16 operator--() noexcept { - const juce_wchar n = *--data; + const juce_wchar n = static_cast (*--data); if (n >= 0xdc00 && n <= 0xdfff) --data; diff --git a/modules/juce_core/text/juce_CharPointer_UTF8.h b/modules/juce_core/text/juce_CharPointer_UTF8.h index 2b09a16315..1f5cec22c8 100644 --- a/modules/juce_core/text/juce_CharPointer_UTF8.h +++ b/modules/juce_core/text/juce_CharPointer_UTF8.h @@ -126,7 +126,7 @@ public: { juce_wchar bit = 0x40; - while ((n & bit) != 0 && bit > 0x8) + while ((static_cast (n) & bit) != 0 && bit > 0x8) { ++data; bit >>= 1; diff --git a/modules/juce_core/text/juce_String.cpp b/modules/juce_core/text/juce_String.cpp index 712097a4fd..7bed65bf14 100644 --- a/modules/juce_core/text/juce_String.cpp +++ b/modules/juce_core/text/juce_String.cpp @@ -1883,7 +1883,7 @@ String String::formatted (const String pf, ... ) #elif JUCE_ANDROID HeapBlock temp (bufferSize); int num = (int) vsnprintf (temp.getData(), bufferSize - 1, pf.toUTF8(), args); - if (num >= bufferSize) + if (num >= static_cast (bufferSize)) num = -1; #else HeapBlock temp (bufferSize); @@ -1926,7 +1926,7 @@ int String::getTrailingIntValue() const noexcept break; } - n += mult * (*t - '0'); + n += static_cast (mult) * (*t - '0'); mult *= 10; } diff --git a/modules/juce_events/native/juce_android_Messaging.cpp b/modules/juce_events/native/juce_android_Messaging.cpp index e4bc452513..46478901b8 100644 --- a/modules/juce_events/native/juce_android_Messaging.cpp +++ b/modules/juce_events/native/juce_android_Messaging.cpp @@ -32,7 +32,7 @@ void MessageManager::doPlatformSpecificInitialisation() {} void MessageManager::doPlatformSpecificShutdown() {} //============================================================================== -bool MessageManager::dispatchNextMessageOnSystemQueue (const bool returnIfNoPendingMessages) +bool MessageManager::dispatchNextMessageOnSystemQueue (const bool) { Logger::outputDebugString ("*** Modal loops are not possible in Android!! Exiting..."); exit (1); @@ -48,7 +48,7 @@ bool MessageManager::postMessageToSystemQueue (MessageManager::MessageBase* cons return true; } -JUCE_JNI_CALLBACK (JUCE_ANDROID_ACTIVITY_CLASSNAME, deliverMessage, void, (JNIEnv* env, jobject activity, jlong value)) +JUCE_JNI_CALLBACK (JUCE_ANDROID_ACTIVITY_CLASSNAME, deliverMessage, void, (JNIEnv* env, jobject, jlong value)) { setEnv (env); diff --git a/modules/juce_graphics/fonts/juce_CustomTypeface.cpp b/modules/juce_graphics/fonts/juce_CustomTypeface.cpp index bb869b01e0..801a9e31a3 100644 --- a/modules/juce_graphics/fonts/juce_CustomTypeface.cpp +++ b/modules/juce_graphics/fonts/juce_CustomTypeface.cpp @@ -227,7 +227,7 @@ void CustomTypeface::addGlyphsFromOtherTypeface (Typeface& typefaceToCopy, juce_ for (int i = 0; i < numCharacters; ++i) { - const juce_wchar c = (juce_wchar) (characterStartIndex + i); + const juce_wchar c = (juce_wchar) (characterStartIndex + static_cast (i)); Array glyphIndexes; Array offsets; diff --git a/modules/juce_graphics/native/juce_android_Fonts.cpp b/modules/juce_graphics/native/juce_android_Fonts.cpp index 6ce3e23c9c..19c5882aac 100644 --- a/modules/juce_graphics/native/juce_android_Fonts.cpp +++ b/modules/juce_graphics/native/juce_android_Fonts.cpp @@ -169,8 +169,8 @@ public: { JNIEnv* const env = getEnv(); - LocalRef bytes (env->NewByteArray (size)); - env->SetByteArrayRegion (bytes, 0, size, (const jbyte*) data); + LocalRef bytes (env->NewByteArray ((jsize) size)); + env->SetByteArrayRegion (bytes, 0, (jsize) size, (const jbyte*) data); typeface = GlobalRef (android.activity.callObjectMethod (JuceAppActivity.getTypeFaceFromByteArray, bytes.get())); @@ -207,7 +207,7 @@ public: const int numDone = paint.callIntMethod (Paint.getTextWidths, javaString (text).get(), widths); - HeapBlock localWidths (numDone); + HeapBlock localWidths (static_cast (numDone)); env->GetFloatArrayRegion (widths, 0, numDone, localWidths); env->DeleteLocalRef (widths); @@ -226,7 +226,7 @@ public: const int numDone = paint.callIntMethod (Paint.getTextWidths, javaString (text).get(), widths); - HeapBlock localWidths (numDone); + HeapBlock localWidths (static_cast (numDone)); env->GetFloatArrayRegion (widths, 0, numDone, localWidths); env->DeleteLocalRef (widths); diff --git a/modules/juce_gui_basics/keyboard/juce_KeyPress.cpp b/modules/juce_gui_basics/keyboard/juce_KeyPress.cpp index 22fc2c2490..237fcdcd2a 100644 --- a/modules/juce_gui_basics/keyboard/juce_KeyPress.cpp +++ b/modules/juce_gui_basics/keyboard/juce_KeyPress.cpp @@ -150,7 +150,7 @@ namespace KeyPressHelpers { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': - return (int) (KeyPress::numberPad0 + lastChar - '0'); + return (int) (KeyPress::numberPad0 + (int) lastChar - '0'); case '+': return KeyPress::numberPadAdd; case '-': return KeyPress::numberPadSubtract; diff --git a/modules/juce_gui_basics/native/juce_android_FileChooser.cpp b/modules/juce_gui_basics/native/juce_android_FileChooser.cpp index 1313f6e2be..eb1642919e 100644 --- a/modules/juce_gui_basics/native/juce_android_FileChooser.cpp +++ b/modules/juce_gui_basics/native/juce_android_FileChooser.cpp @@ -22,17 +22,17 @@ ============================================================================== */ -void FileChooser::showPlatformDialog (Array& results, - const String& title, - const File& currentFileOrDirectory, - const String& filter, - bool selectsDirectory, - bool selectsFiles, - bool isSaveDialogue, - bool warnAboutOverwritingExistingFiles, - bool selectMultipleFiles, +void FileChooser::showPlatformDialog (Array& /*results*/, + const String& /*title*/, + const File& /*currentFileOrDirectory*/, + const String& /*filter*/, + bool /*selectsDirectory*/, + bool /*selectsFiles*/, + bool /*isSaveDialogue*/, + bool /*warnAboutOverwritingExistingFiles*/, + bool /*selectMultipleFiles*/, bool /*treatFilePackagesAsDirs*/, - FilePreviewComponent* extraInfoComponent) + FilePreviewComponent* /*extraInfoComponent*/) { // TODO diff --git a/modules/juce_gui_basics/native/juce_android_Windowing.cpp b/modules/juce_gui_basics/native/juce_android_Windowing.cpp index f15925f50c..15584dd703 100644 --- a/modules/juce_gui_basics/native/juce_android_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_android_Windowing.cpp @@ -56,7 +56,7 @@ JUCE_JNI_CALLBACK (JUCE_ANDROID_ACTIVITY_CLASSNAME, launchApp, void, (JNIEnv* en jassert (MessageManager::getInstance()->isThisTheMessageThread()); } -JUCE_JNI_CALLBACK (JUCE_ANDROID_ACTIVITY_CLASSNAME, suspendApp, void, (JNIEnv* env, jobject activity)) +JUCE_JNI_CALLBACK (JUCE_ANDROID_ACTIVITY_CLASSNAME, suspendApp, void, (JNIEnv* env, jobject)) { setEnv (env); @@ -64,7 +64,7 @@ JUCE_JNI_CALLBACK (JUCE_ANDROID_ACTIVITY_CLASSNAME, suspendApp, void, (JNIEnv* e app->suspended(); } -JUCE_JNI_CALLBACK (JUCE_ANDROID_ACTIVITY_CLASSNAME, resumeApp, void, (JNIEnv* env, jobject activity)) +JUCE_JNI_CALLBACK (JUCE_ANDROID_ACTIVITY_CLASSNAME, resumeApp, void, (JNIEnv* env, jobject)) { setEnv (env); @@ -72,7 +72,7 @@ JUCE_JNI_CALLBACK (JUCE_ANDROID_ACTIVITY_CLASSNAME, resumeApp, void, (JNIEnv* en app->resumed(); } -JUCE_JNI_CALLBACK (JUCE_ANDROID_ACTIVITY_CLASSNAME, quitApp, void, (JNIEnv* env, jobject activity)) +JUCE_JNI_CALLBACK (JUCE_ANDROID_ACTIVITY_CLASSNAME, quitApp, void, (JNIEnv* env, jobject)) { setEnv (env); @@ -213,7 +213,7 @@ public: class ViewMover : public CallbackMessage { public: - ViewMover (const GlobalRef& v, const Rectangle& r) : view (v), bounds (r) {} + ViewMover (const GlobalRef& v, const Rectangle& boundsToUse) : view (v), bounds (boundsToUse) {} void messageCallback() override { @@ -262,7 +262,7 @@ public: return screenPosition - getScreenPosition().toFloat(); } - void setMinimised (bool shouldBeMinimised) override + void setMinimised (bool /*shouldBeMinimised*/) override { // n/a } @@ -337,7 +337,7 @@ public: stopTimer(); } - void setIcon (const Image& newIcon) override + void setIcon (const Image& /*newIcon*/) override { // n/a } @@ -357,7 +357,7 @@ public: return BorderSize(); } - bool setAlwaysOnTop (bool alwaysOnTop) override + bool setAlwaysOnTop (bool /*alwaysOnTop*/) override { // TODO return false; @@ -419,10 +419,10 @@ public: void handleKeyDownCallback (int k, int kc) { - handleKeyPress (k, kc); + handleKeyPress (k, static_cast (kc)); } - void handleKeyUpCallback (int k, int kc) + void handleKeyUpCallback (int /*k*/, int /*kc*/) { } @@ -549,7 +549,7 @@ public: // TODO } - void setAlpha (float newAlpha) override + void setAlpha (float /*newAlpha*/) override { // TODO } @@ -578,7 +578,7 @@ private: : ImagePixelData (Image::ARGB, width_, height_), data (data_), hasAlpha (hasAlpha_) { if (hasAlpha_) - zeromem (data_, width * height * sizeof (jint)); + zeromem (data_, static_cast (width * height) * sizeof (jint)); } ~PreallocatedImage() @@ -598,10 +598,10 @@ private: ImageType* createType() const override { return new SoftwareImageType(); } LowLevelGraphicsContext* createLowLevelContext() override { return new LowLevelGraphicsSoftwareRenderer (Image (this)); } - void initialiseBitmapData (Image::BitmapData& bm, int x, int y, Image::BitmapData::ReadWriteMode mode) override + void initialiseBitmapData (Image::BitmapData& bm, int x, int y, Image::BitmapData::ReadWriteMode /*mode*/) override { - bm.lineStride = width * sizeof (jint); - bm.pixelStride = sizeof (jint); + bm.lineStride = width * static_cast (sizeof (jint)); + bm.pixelStride = static_cast (sizeof (jint)); bm.pixelFormat = Image::ARGB; bm.data = (uint8*) (data + x + y * width); } @@ -609,9 +609,9 @@ private: ImagePixelData::Ptr clone() override { PreallocatedImage* s = new PreallocatedImage (width, height, 0, hasAlpha); - s->allocatedData.malloc (sizeof (jint) * width * height); + s->allocatedData.malloc (sizeof (jint) * static_cast (width * height)); s->data = s->allocatedData; - memcpy (s->data, data, sizeof (jint) * width * height); + memcpy (s->data, data, sizeof (jint) * static_cast (width * height)); return s; } @@ -639,14 +639,14 @@ int64 AndroidComponentPeer::touchesDown = 0; peer->juceMethodInvocation; \ } -JUCE_VIEW_CALLBACK (void, handlePaint, (JNIEnv* env, jobject view, jlong host, jobject canvas, jobject paint), handlePaintCallback (env, canvas, paint)) -JUCE_VIEW_CALLBACK (void, handleMouseDown, (JNIEnv* env, jobject view, jlong host, jint i, jfloat x, jfloat y, jlong time), handleMouseDownCallback (i, Point ((float) x, (float) y), (int64) time)) -JUCE_VIEW_CALLBACK (void, handleMouseDrag, (JNIEnv* env, jobject view, jlong host, jint i, jfloat x, jfloat y, jlong time), handleMouseDragCallback (i, Point ((float) x, (float) y), (int64) time)) -JUCE_VIEW_CALLBACK (void, handleMouseUp, (JNIEnv* env, jobject view, jlong host, jint i, jfloat x, jfloat y, jlong time), handleMouseUpCallback (i, Point ((float) x, (float) y), (int64) time)) -JUCE_VIEW_CALLBACK (void, viewSizeChanged, (JNIEnv* env, jobject view, jlong host), handleMovedOrResized()) -JUCE_VIEW_CALLBACK (void, focusChanged, (JNIEnv* env, jobject view, jlong host, jboolean hasFocus), handleFocusChangeCallback (hasFocus)) -JUCE_VIEW_CALLBACK (void, handleKeyDown, (JNIEnv* env, jobject view, jlong host, jint k, jint kc), handleKeyDownCallback ((int) k, (int) kc)) -JUCE_VIEW_CALLBACK (void, handleKeyUp, (JNIEnv* env, jobject view, jlong host, jint k, jint kc), handleKeyUpCallback ((int) k, (int) kc)) +JUCE_VIEW_CALLBACK (void, handlePaint, (JNIEnv* env, jobject /*view*/, jlong host, jobject canvas, jobject paint), handlePaintCallback (env, canvas, paint)) +JUCE_VIEW_CALLBACK (void, handleMouseDown, (JNIEnv* env, jobject /*view*/, jlong host, jint i, jfloat x, jfloat y, jlong time), handleMouseDownCallback (i, Point ((float) x, (float) y), (int64) time)) +JUCE_VIEW_CALLBACK (void, handleMouseDrag, (JNIEnv* env, jobject /*view*/, jlong host, jint i, jfloat x, jfloat y, jlong time), handleMouseDragCallback (i, Point ((float) x, (float) y), (int64) time)) +JUCE_VIEW_CALLBACK (void, handleMouseUp, (JNIEnv* env, jobject /*view*/, jlong host, jint i, jfloat x, jfloat y, jlong time), handleMouseUpCallback (i, Point ((float) x, (float) y), (int64) time)) +JUCE_VIEW_CALLBACK (void, viewSizeChanged, (JNIEnv* env, jobject /*view*/, jlong host), handleMovedOrResized()) +JUCE_VIEW_CALLBACK (void, focusChanged, (JNIEnv* env, jobject /*view*/, jlong host, jboolean hasFocus), handleFocusChangeCallback (hasFocus)) +JUCE_VIEW_CALLBACK (void, handleKeyDown, (JNIEnv* env, jobject /*view*/, jlong host, jint k, jint kc), handleKeyDownCallback ((int) k, (int) kc)) +JUCE_VIEW_CALLBACK (void, handleKeyUp, (JNIEnv* env, jobject /*view*/, jlong host, jint k, jint kc), handleKeyUpCallback ((int) k, (int) kc)) //============================================================================== ComponentPeer* Component::createNewPeer (int styleFlags, void*) @@ -688,7 +688,7 @@ void MouseInputSource::setRawMousePosition (Point) } //============================================================================== -bool KeyPress::isKeyCurrentlyDown (const int keyCode) +bool KeyPress::isKeyCurrentlyDown (const int /*keyCode*/) { // TODO return false; @@ -711,18 +711,18 @@ JUCE_API void JUCE_CALLTYPE Process::makeForegroundProcess() {} JUCE_API void JUCE_CALLTYPE Process::hide() {} //============================================================================== -void JUCE_CALLTYPE NativeMessageBox::showMessageBoxAsync (AlertWindow::AlertIconType iconType, +void JUCE_CALLTYPE NativeMessageBox::showMessageBoxAsync (AlertWindow::AlertIconType /*iconType*/, const String& title, const String& message, - Component* associatedComponent, + Component* /*associatedComponent*/, ModalComponentManager::Callback* callback) { android.activity.callVoidMethod (JuceAppActivity.showMessageBox, javaString (title).get(), javaString (message).get(), (jlong) (pointer_sized_int) callback); } -bool JUCE_CALLTYPE NativeMessageBox::showOkCancelBox (AlertWindow::AlertIconType iconType, +bool JUCE_CALLTYPE NativeMessageBox::showOkCancelBox (AlertWindow::AlertIconType /*iconType*/, const String& title, const String& message, - Component* associatedComponent, + Component* /*associatedComponent*/, ModalComponentManager::Callback* callback) { jassert (callback != nullptr); // on android, all alerts must be non-modal!! @@ -732,9 +732,9 @@ bool JUCE_CALLTYPE NativeMessageBox::showOkCancelBox (AlertWindow::AlertIconType return false; } -int JUCE_CALLTYPE NativeMessageBox::showYesNoCancelBox (AlertWindow::AlertIconType iconType, +int JUCE_CALLTYPE NativeMessageBox::showYesNoCancelBox (AlertWindow::AlertIconType /*iconType*/, const String& title, const String& message, - Component* associatedComponent, + Component* /*associatedComponent*/, ModalComponentManager::Callback* callback) { jassert (callback != nullptr); // on android, all alerts must be non-modal!! @@ -744,7 +744,7 @@ int JUCE_CALLTYPE NativeMessageBox::showYesNoCancelBox (AlertWindow::AlertIconTy return 0; } -JUCE_JNI_CALLBACK (JUCE_ANDROID_ACTIVITY_CLASSNAME, alertDismissed, void, (JNIEnv* env, jobject activity, +JUCE_JNI_CALLBACK (JUCE_ANDROID_ACTIVITY_CLASSNAME, alertDismissed, void, (JNIEnv* env, jobject /*activity*/, jlong callbackAsLong, jint result)) { setEnv (env); @@ -830,7 +830,7 @@ void Desktop::Displays::findDisplays (float masterScale) displays.add (d); } -JUCE_JNI_CALLBACK (JUCE_ANDROID_ACTIVITY_CLASSNAME, setScreenSize, void, (JNIEnv* env, jobject activity, +JUCE_JNI_CALLBACK (JUCE_ANDROID_ACTIVITY_CLASSNAME, setScreenSize, void, (JNIEnv* env, jobject /*activity*/, jint screenWidth, jint screenHeight, jint dpi)) { @@ -844,7 +844,7 @@ JUCE_JNI_CALLBACK (JUCE_ANDROID_ACTIVITY_CLASSNAME, setScreenSize, void, (JNIEnv } //============================================================================== -Image juce_createIconForFile (const File& file) +Image juce_createIconForFile (const File& /*file*/) { return Image(); } @@ -859,12 +859,12 @@ void MouseCursor::showInWindow (ComponentPeer*) const {} void MouseCursor::showInAllWindows() const {} //============================================================================== -bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& files, const bool canMove) +bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& /*files*/, const bool /*canMove*/) { return false; } -bool DragAndDropContainer::performExternalDragDropOfText (const String& text) +bool DragAndDropContainer::performExternalDragDropOfText (const String& /*text*/) { return false; } diff --git a/modules/juce_opengl/native/juce_OpenGL_android.h b/modules/juce_opengl/native/juce_OpenGL_android.h index 1831aa4516..db12b4c528 100644 --- a/modules/juce_opengl/native/juce_OpenGL_android.h +++ b/modules/juce_opengl/native/juce_OpenGL_android.h @@ -43,7 +43,7 @@ class OpenGLContext::NativeContext { public: NativeContext (Component& comp, - const OpenGLPixelFormat& pixelFormat, + const OpenGLPixelFormat& /*pixelFormat*/, void* /*contextToShareWith*/, bool /*useMultisampling*/, OpenGLVersion)