From 5e803ded5fd6344d56dde772330a4a7785e9d14a Mon Sep 17 00:00:00 2001 From: Anthony Nicholls Date: Fri, 27 Sep 2024 16:26:59 +0100 Subject: [PATCH] Deprecations: Add ignore deprecation warning macros --- .../buffers/juce_AudioDataConverters.cpp | 6 ++---- modules/juce_audio_basics/midi/juce_MidiBuffer.cpp | 6 ++---- modules/juce_audio_basics/midi/juce_MidiMessage.cpp | 6 ++---- modules/juce_audio_devices/native/juce_Audio_ios.cpp | 4 ++-- .../codecs/juce_OggVorbisAudioFormat.cpp | 7 +++++-- .../format_types/juce_LV2SupportLibs.cpp | 5 +++-- .../format_types/juce_LegacyAudioParameter.cpp | 6 ++---- .../format_types/juce_VST3PluginFormat.cpp | 4 ++-- .../format_types/juce_VSTPluginFormat.cpp | 10 +++------- .../processors/juce_AudioProcessor.cpp | 6 ++---- modules/juce_core/containers/juce_Variant.cpp | 6 ++---- modules/juce_core/files/juce_DirectoryIterator.cpp | 6 ++---- modules/juce_core/files/juce_File.cpp | 6 ++---- .../juce_core/files/juce_RangedDirectoryIterator.cpp | 6 ++---- .../juce_core/files/juce_RangedDirectoryIterator.h | 6 ++---- modules/juce_core/memory/juce_ScopedPointer.h | 12 ++++-------- .../native/juce_AndroidDocument_android.cpp | 6 ++---- modules/juce_core/native/juce_Files_mac.mm | 4 ++-- modules/juce_core/native/juce_Files_windows.cpp | 4 ++-- modules/juce_core/native/juce_SharedCode_posix.h | 4 ++-- modules/juce_core/system/juce_CompilerWarnings.h | 8 ++++++++ modules/juce_core/text/juce_String.cpp | 10 ++++------ .../juce_data_structures/values/juce_ValueTree.cpp | 6 ++---- .../interprocess/juce_ConnectedChildProcess.cpp | 12 ++++-------- .../juce_events/native/juce_MessageManager_mac.mm | 4 ++-- modules/juce_graphics/fonts/juce_Font.cpp | 12 ++++-------- modules/juce_graphics/images/juce_Image.cpp | 6 ++---- modules/juce_graphics/juce_graphics_Harfbuzz.cpp | 8 +++++--- .../juce_gui_basics/native/juce_FileChooser_mac.mm | 4 ++-- .../native/juce_NSViewComponentPeer_mac.mm | 4 ++-- .../native/juce_PerScreenDisplayLinks_mac.h | 4 ++-- .../native/juce_UIViewComponentPeer_ios.mm | 4 ++-- modules/juce_gui_basics/native/juce_Windowing_mac.mm | 4 ++-- .../code_editor/juce_CodeEditorComponent.cpp | 6 ++---- .../juce_gui_extra/native/juce_AppleRemote_mac.mm | 4 ++-- .../native/juce_PushNotifications_mac.cpp | 4 ++-- .../native/juce_SystemTrayIcon_mac.cpp | 4 ++-- .../native/juce_WebBrowserComponent_linux.cpp | 4 ++-- .../native/juce_WebBrowserComponent_mac.mm | 12 ++++++------ modules/juce_opengl/native/juce_OpenGL_mac.h | 4 ++-- .../marketplace/juce_OnlineUnlockStatus.cpp | 6 ++---- modules/juce_video/native/juce_CameraDevice_mac.h | 12 ++++++------ 42 files changed, 114 insertions(+), 148 deletions(-) diff --git a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp index 15450baa5b..192019ac77 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp +++ b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp @@ -35,8 +35,7 @@ namespace juce { -JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") -JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) +JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS void AudioDataConverters::convertFloatToInt16LE (const float* source, void* dest, int numSamples, int destBytesPerSample) { @@ -641,7 +640,6 @@ static AudioConversionTests audioConversionUnitTests; #endif -JUCE_END_IGNORE_WARNINGS_MSVC -JUCE_END_IGNORE_WARNINGS_GCC_LIKE +JUCE_END_IGNORE_DEPRECATION_WARNINGS } // namespace juce diff --git a/modules/juce_audio_basics/midi/juce_MidiBuffer.cpp b/modules/juce_audio_basics/midi/juce_MidiBuffer.cpp index fa1dafc6bf..b089840e8b 100644 --- a/modules/juce_audio_basics/midi/juce_MidiBuffer.cpp +++ b/modules/juce_audio_basics/midi/juce_MidiBuffer.cpp @@ -221,8 +221,7 @@ MidiBufferIterator MidiBuffer::findNextSamplePosition (int samplePosition) const } //============================================================================== -JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") -JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) +JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS MidiBuffer::Iterator::Iterator (const MidiBuffer& b) noexcept : buffer (b), iterator (b.data.begin()) @@ -257,8 +256,7 @@ bool MidiBuffer::Iterator::getNextEvent (MidiMessage& result, int& samplePositio return true; } -JUCE_END_IGNORE_WARNINGS_MSVC -JUCE_END_IGNORE_WARNINGS_GCC_LIKE +JUCE_END_IGNORE_DEPRECATION_WARNINGS //============================================================================== //============================================================================== diff --git a/modules/juce_audio_basics/midi/juce_MidiMessage.cpp b/modules/juce_audio_basics/midi/juce_MidiMessage.cpp index 940cb00111..530a880f3a 100644 --- a/modules/juce_audio_basics/midi/juce_MidiMessage.cpp +++ b/modules/juce_audio_basics/midi/juce_MidiMessage.cpp @@ -1231,8 +1231,7 @@ struct MidiMessageTest final : public UnitTest size_t index = 0; - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") - JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) + JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS for (const auto& input : inputs) { @@ -1258,8 +1257,7 @@ struct MidiMessageTest final : public UnitTest ++index; } - JUCE_END_IGNORE_WARNINGS_GCC_LIKE - JUCE_END_IGNORE_WARNINGS_MSVC + JUCE_END_IGNORE_DEPRECATION_WARNINGS } beginTest ("ReadVariableLengthVal should return 0 if input is truncated"); diff --git a/modules/juce_audio_devices/native/juce_Audio_ios.cpp b/modules/juce_audio_devices/native/juce_Audio_ios.cpp index e7b1c5fbe1..36f2449dfd 100644 --- a/modules/juce_audio_devices/native/juce_Audio_ios.cpp +++ b/modules/juce_audio_devices/native/juce_Audio_ios.cpp @@ -818,7 +818,7 @@ struct iOSAudioIODevice::Pimpl final : public AsyncUpdater //============================================================================== #if JUCE_MODULE_AVAILABLE_juce_graphics - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") + JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS Image getIcon (int size) { #if TARGET_OS_MACCATALYST @@ -834,7 +834,7 @@ struct iOSAudioIODevice::Pimpl final : public AsyncUpdater return {}; } - JUCE_END_IGNORE_WARNINGS_GCC_LIKE + JUCE_END_IGNORE_DEPRECATION_WARNINGS #endif void switchApplication() diff --git a/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp index e45016b493..15f744ac16 100644 --- a/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp @@ -44,11 +44,10 @@ namespace juce namespace OggVorbisNamespace { #if JUCE_INCLUDE_OGGVORBIS_CODE || ! defined (JUCE_INCLUDE_OGGVORBIS_CODE) - JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706 4995 4365 4456 4457 4459 6297 6011 6001 6308 6255 6386 6385 6246 6387 6263 6262 28182) + JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4267 4127 4244 4100 4701 4702 4013 4133 4206 4305 4189 4706 4995 4365 4456 4457 4459 6297 6011 6001 6308 6255 6386 6385 6246 6387 6263 6262 28182) JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wcast-align", "-Wconversion", - "-Wdeprecated-declarations", "-Wdeprecated-register", "-Wfloat-conversion", "-Wfloat-equal", @@ -61,6 +60,9 @@ namespace OggVorbisNamespace "-Wswitch-default", "-Wswitch-enum", "-Wzero-as-null-pointer-constant") + + JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS + JUCE_BEGIN_NO_SANITIZE ("undefined") #include "oggvorbis/vorbisenc.h" @@ -92,6 +94,7 @@ namespace OggVorbisNamespace #include "oggvorbis/libvorbis-1.3.7/lib/window.c" JUCE_END_NO_SANITIZE + JUCE_END_IGNORE_DEPRECATION_WARNINGS JUCE_END_IGNORE_WARNINGS_MSVC JUCE_END_IGNORE_WARNINGS_GCC_LIKE #else diff --git a/modules/juce_audio_processors/format_types/juce_LV2SupportLibs.cpp b/modules/juce_audio_processors/format_types/juce_LV2SupportLibs.cpp index d55c302fbf..ac718f197e 100644 --- a/modules/juce_audio_processors/format_types/juce_LV2SupportLibs.cpp +++ b/modules/juce_audio_processors/format_types/juce_LV2SupportLibs.cpp @@ -37,7 +37,6 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wc99-extensions", "-Wcast-align", "-Wconversion", - "-Wdeprecated-declarations", "-Wextra-semi", "-Wfloat-conversion", "-Wfloat-equal", @@ -56,7 +55,8 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wc99-extensions", "-Wswitch-enum", "-Wunused-parameter", "-Wzero-as-null-pointer-constant") -JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4100 4200 4244 4267 4389 4702 4706 4800 4996 6308 28182 28183 6385 6386 6387 6011 6282 6323 6330 6001 6031) +JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4100 4200 4244 4267 4389 4702 4706 4800 6308 28182 28183 6385 6386 6387 6011 6282 6323 6330 6001 6031) +JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS extern "C" { @@ -113,5 +113,6 @@ extern "C" } // extern "C" +JUCE_END_IGNORE_DEPRECATION_WARNINGS JUCE_END_IGNORE_WARNINGS_MSVC JUCE_END_IGNORE_WARNINGS_GCC_LIKE diff --git a/modules/juce_audio_processors/format_types/juce_LegacyAudioParameter.cpp b/modules/juce_audio_processors/format_types/juce_LegacyAudioParameter.cpp index 380abce17b..977206dc07 100644 --- a/modules/juce_audio_processors/format_types/juce_LegacyAudioParameter.cpp +++ b/modules/juce_audio_processors/format_types/juce_LegacyAudioParameter.cpp @@ -35,8 +35,7 @@ namespace juce { -JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") -JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) +JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS class LegacyAudioParameter final : public HostedAudioProcessorParameter { @@ -219,7 +218,6 @@ private: bool legacyParamIDs = false, usingManagedParameters = false; }; -JUCE_END_IGNORE_WARNINGS_GCC_LIKE -JUCE_END_IGNORE_WARNINGS_MSVC +JUCE_END_IGNORE_DEPRECATION_WARNINGS } // namespace juce diff --git a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp index 7afd89b9e6..41cddcc03c 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp @@ -1932,7 +1932,7 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VST3PluginWindow) }; -JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) // warning about overriding deprecated methods +JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS //============================================================================== static bool hasARAExtension (IPluginFactory* pluginFactory, const String& pluginClassName) @@ -3891,7 +3891,7 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VST3PluginInstance) }; -JUCE_END_IGNORE_WARNINGS_MSVC +JUCE_END_IGNORE_DEPRECATION_WARNINGS //============================================================================== tresult VST3HostContext::beginEdit (Vst::ParamID paramID) diff --git a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp index 08b48f1f32..0a8f485642 100644 --- a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp @@ -63,11 +63,11 @@ struct AEffect; #include "juce_VSTCommon.h" -JUCE_END_IGNORE_WARNINGS_GCC_LIKE JUCE_END_IGNORE_WARNINGS_MSVC +JUCE_END_IGNORE_WARNINGS_GCC_LIKE -JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4355) +JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS #include "juce_VSTMidiEventList.h" @@ -828,8 +828,6 @@ private: static const int defaultVSTSampleRateValue = 44100; static const int defaultVSTBlockSizeValue = 512; -JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) - class TempChannelPointers { public: @@ -3446,8 +3444,6 @@ private: }; #endif -JUCE_END_IGNORE_WARNINGS_MSVC - //============================================================================== AudioProcessorEditor* VSTPluginInstance::createEditor() { @@ -3762,7 +3758,7 @@ void VSTPluginFormat::aboutToScanVSTShellPlugin (const PluginDescription&) {} } // namespace juce -JUCE_END_IGNORE_WARNINGS_GCC_LIKE +JUCE_END_IGNORE_DEPRECATION_WARNINGS JUCE_END_IGNORE_WARNINGS_MSVC #endif diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp index b9fe2031c1..740eb051cf 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp @@ -1271,8 +1271,7 @@ VST3ClientExtensions* AudioProcessor::getVST3ClientExtensions() } //============================================================================== -JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") -JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) +JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS void AudioProcessor::setParameterNotifyingHost (int parameterIndex, float newValue) { @@ -1510,8 +1509,7 @@ AudioProcessorParameter* AudioProcessor::getParamChecked (int index) const bool AudioProcessor::canAddBus ([[maybe_unused]] bool isInput) const { return false; } bool AudioProcessor::canRemoveBus ([[maybe_unused]] bool isInput) const { return false; } -JUCE_END_IGNORE_WARNINGS_GCC_LIKE -JUCE_END_IGNORE_WARNINGS_MSVC +JUCE_END_IGNORE_DEPRECATION_WARNINGS //============================================================================== void AudioProcessorListener::audioProcessorParameterChangeGestureBegin (AudioProcessor*, int) {} diff --git a/modules/juce_core/containers/juce_Variant.cpp b/modules/juce_core/containers/juce_Variant.cpp index 0c6b6728d0..0b45553bef 100644 --- a/modules/juce_core/containers/juce_Variant.cpp +++ b/modules/juce_core/containers/juce_Variant.cpp @@ -896,13 +896,11 @@ var::NativeFunctionArgs::NativeFunctionArgs (const var& t, const var* args, int //============================================================================== #if JUCE_ALLOW_STATIC_NULL_VARIABLES -JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") -JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) +JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS const var var::null; -JUCE_END_IGNORE_WARNINGS_GCC_LIKE -JUCE_END_IGNORE_WARNINGS_MSVC +JUCE_END_IGNORE_DEPRECATION_WARNINGS #endif diff --git a/modules/juce_core/files/juce_DirectoryIterator.cpp b/modules/juce_core/files/juce_DirectoryIterator.cpp index 4ea33f5377..782636472c 100644 --- a/modules/juce_core/files/juce_DirectoryIterator.cpp +++ b/modules/juce_core/files/juce_DirectoryIterator.cpp @@ -58,8 +58,7 @@ bool DirectoryIterator::next() return next (nullptr, nullptr, nullptr, nullptr, nullptr, nullptr); } -JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") -JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) +JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS bool DirectoryIterator::next (bool* isDirResult, bool* isHiddenResult, int64* fileSize, Time* modTime, Time* creationTime, bool* isReadOnly) @@ -144,8 +143,7 @@ bool DirectoryIterator::next (bool* isDirResult, bool* isHiddenResult, int64* fi } } -JUCE_END_IGNORE_WARNINGS_GCC_LIKE -JUCE_END_IGNORE_WARNINGS_MSVC +JUCE_END_IGNORE_DEPRECATION_WARNINGS const File& DirectoryIterator::getFile() const { diff --git a/modules/juce_core/files/juce_File.cpp b/modules/juce_core/files/juce_File.cpp index ebc5a95796..4fd9e4288c 100644 --- a/modules/juce_core/files/juce_File.cpp +++ b/modules/juce_core/files/juce_File.cpp @@ -1029,13 +1029,11 @@ File File::getLinkedTarget() const //============================================================================== #if JUCE_ALLOW_STATIC_NULL_VARIABLES -JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") -JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) +JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS const File File::nonexistent{}; -JUCE_END_IGNORE_WARNINGS_GCC_LIKE -JUCE_END_IGNORE_WARNINGS_MSVC +JUCE_END_IGNORE_DEPRECATION_WARNINGS #endif diff --git a/modules/juce_core/files/juce_RangedDirectoryIterator.cpp b/modules/juce_core/files/juce_RangedDirectoryIterator.cpp index cc4b7b4a98..181bd01a77 100644 --- a/modules/juce_core/files/juce_RangedDirectoryIterator.cpp +++ b/modules/juce_core/files/juce_RangedDirectoryIterator.cpp @@ -35,8 +35,7 @@ namespace juce { -JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") -JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) +JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS float DirectoryEntry::getEstimatedProgress() const { @@ -85,7 +84,6 @@ void RangedDirectoryIterator::increment() iterator = nullptr; } -JUCE_END_IGNORE_WARNINGS_GCC_LIKE -JUCE_END_IGNORE_WARNINGS_MSVC +JUCE_END_IGNORE_DEPRECATION_WARNINGS } // namespace juce diff --git a/modules/juce_core/files/juce_RangedDirectoryIterator.h b/modules/juce_core/files/juce_RangedDirectoryIterator.h index 1f6ca54483..ef9b6d2234 100644 --- a/modules/juce_core/files/juce_RangedDirectoryIterator.h +++ b/modules/juce_core/files/juce_RangedDirectoryIterator.h @@ -36,8 +36,7 @@ namespace juce { //============================================================================== -JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") -JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) +JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS /** Describes the attributes of a file or folder. @@ -196,7 +195,6 @@ inline RangedDirectoryIterator begin (const RangedDirectoryIterator& it) { retur inline RangedDirectoryIterator end (const RangedDirectoryIterator&) { return {}; } -JUCE_END_IGNORE_WARNINGS_MSVC -JUCE_END_IGNORE_WARNINGS_GCC_LIKE +JUCE_END_IGNORE_DEPRECATION_WARNINGS } // namespace juce diff --git a/modules/juce_core/memory/juce_ScopedPointer.h b/modules/juce_core/memory/juce_ScopedPointer.h index f16afbb522..107190bff1 100644 --- a/modules/juce_core/memory/juce_ScopedPointer.h +++ b/modules/juce_core/memory/juce_ScopedPointer.h @@ -46,8 +46,7 @@ class [[deprecated]] ScopedPointer { public: //============================================================================== - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") - JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) + JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS inline ScopedPointer() {} @@ -154,13 +153,11 @@ private: ScopedPointer& operator= (const ScopedPointer&) = delete; #endif - JUCE_END_IGNORE_WARNINGS_MSVC - JUCE_END_IGNORE_WARNINGS_GCC_LIKE + JUCE_END_IGNORE_DEPRECATION_WARNINGS }; //============================================================================== -JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") -JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) +JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS template bool operator== (ObjectType1* pointer1, const ScopedPointer& pointer2) noexcept @@ -228,8 +225,7 @@ template void deleteAndZero (ScopedPointer&) { static_assert (sizeof (Type) == 12345, "Attempt to call deleteAndZero() on a ScopedPointer"); } -JUCE_END_IGNORE_WARNINGS_GCC_LIKE -JUCE_END_IGNORE_WARNINGS_MSVC +JUCE_END_IGNORE_DEPRECATION_WARNINGS } // namespace juce diff --git a/modules/juce_core/native/juce_AndroidDocument_android.cpp b/modules/juce_core/native/juce_AndroidDocument_android.cpp index 6282ea6a67..fd8e7cabb4 100644 --- a/modules/juce_core/native/juce_AndroidDocument_android.cpp +++ b/modules/juce_core/native/juce_AndroidDocument_android.cpp @@ -231,12 +231,10 @@ struct AndroidDocumentDetail struct DirectoryIteratorEngine { - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") - JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) + JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS DirectoryIteratorEngine (const File& dir, bool recursive) : iterator (dir, recursive, "*", File::findFilesAndDirectories) {} - JUCE_END_IGNORE_WARNINGS_MSVC - JUCE_END_IGNORE_WARNINGS_GCC_LIKE + JUCE_END_IGNORE_DEPRECATION_WARNINGS auto read() const { return AndroidDocument::fromFile (iterator.getFile()); } bool increment() { return iterator.next(); } diff --git a/modules/juce_core/native/juce_Files_mac.mm b/modules/juce_core/native/juce_Files_mac.mm index dc39f8c54e..3e81d843bf 100644 --- a/modules/juce_core/native/juce_Files_mac.mm +++ b/modules/juce_core/native/juce_Files_mac.mm @@ -431,7 +431,7 @@ bool JUCE_CALLTYPE Process::openDocument (const String& fileName, [[maybe_unused return true; } - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") + JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS NSMutableDictionary* dict = [[NSMutableDictionary new] autorelease]; @@ -443,7 +443,7 @@ bool JUCE_CALLTYPE Process::openDocument (const String& fileName, [[maybe_unused configuration: dict error: nil]; - JUCE_END_IGNORE_WARNINGS_GCC_LIKE + JUCE_END_IGNORE_DEPRECATION_WARNINGS } if (file.exists()) diff --git a/modules/juce_core/native/juce_Files_windows.cpp b/modules/juce_core/native/juce_Files_windows.cpp index bbfe611c29..8db0a1ff91 100644 --- a/modules/juce_core/native/juce_Files_windows.cpp +++ b/modules/juce_core/native/juce_Files_windows.cpp @@ -253,12 +253,12 @@ namespace WindowsFileHelpers //============================================================================== #if JUCE_ALLOW_STATIC_NULL_VARIABLES -JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) +JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS const juce_wchar File::separator = '\\'; const StringRef File::separatorString ("\\"); -JUCE_END_IGNORE_WARNINGS_MSVC +JUCE_END_IGNORE_DEPRECATION_WARNINGS #endif diff --git a/modules/juce_core/native/juce_SharedCode_posix.h b/modules/juce_core/native/juce_SharedCode_posix.h index c53ef0fff6..3f505f09c0 100644 --- a/modules/juce_core/native/juce_SharedCode_posix.h +++ b/modules/juce_core/native/juce_SharedCode_posix.h @@ -113,12 +113,12 @@ static MaxNumFileHandlesInitialiser maxNumFileHandlesInitialiser; //============================================================================== #if JUCE_ALLOW_STATIC_NULL_VARIABLES -JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") +JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS const juce_wchar File::separator = '/'; const StringRef File::separatorString ("/"); -JUCE_END_IGNORE_WARNINGS_GCC_LIKE +JUCE_END_IGNORE_DEPRECATION_WARNINGS #endif diff --git a/modules/juce_core/system/juce_CompilerWarnings.h b/modules/juce_core/system/juce_CompilerWarnings.h index 9bd8f5abea..1f49054797 100644 --- a/modules/juce_core/system/juce_CompilerWarnings.h +++ b/modules/juce_core/system/juce_CompilerWarnings.h @@ -238,6 +238,14 @@ #define JUCE_SANITIZER_ATTRIBUTE_MINIMUM_CLANG_VERSION 9 #endif +#define JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS \ + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") \ + JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) + +#define JUCE_END_IGNORE_DEPRECATION_WARNINGS \ + JUCE_END_IGNORE_WARNINGS_MSVC \ + JUCE_END_IGNORE_WARNINGS_GCC_LIKE + /** Disable sanitizers for a range of functions. This functionality doesn't seem to exist on GCC yet, so at the moment this only works for clang. diff --git a/modules/juce_core/text/juce_String.cpp b/modules/juce_core/text/juce_String.cpp index ed06d7c93a..d85cfd3009 100644 --- a/modules/juce_core/text/juce_String.cpp +++ b/modules/juce_core/text/juce_String.cpp @@ -1860,7 +1860,7 @@ String String::formattedRaw (const char* pf, ...) va_start (args, pf); #if JUCE_WINDOWS - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") + JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS #endif #if JUCE_ANDROID @@ -1881,7 +1881,7 @@ String String::formattedRaw (const char* pf, ...) #endif #if JUCE_WINDOWS - JUCE_END_IGNORE_WARNINGS_GCC_LIKE + JUCE_END_IGNORE_DEPRECATION_WARNINGS #endif va_end (args); @@ -2342,13 +2342,11 @@ static String serialiseDouble (double input, int maxDecimalPlaces = 0) //============================================================================== #if JUCE_ALLOW_STATIC_NULL_VARIABLES -JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") -JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) +JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS const String String::empty; -JUCE_END_IGNORE_WARNINGS_GCC_LIKE -JUCE_END_IGNORE_WARNINGS_MSVC +JUCE_END_IGNORE_DEPRECATION_WARNINGS #endif diff --git a/modules/juce_data_structures/values/juce_ValueTree.cpp b/modules/juce_data_structures/values/juce_ValueTree.cpp index e534747f14..b0df154664 100644 --- a/modules/juce_data_structures/values/juce_ValueTree.cpp +++ b/modules/juce_data_structures/values/juce_ValueTree.cpp @@ -1111,13 +1111,11 @@ void ValueTree::Listener::valueTreeRedirected (ValueTree&) //============================================================================== #if JUCE_ALLOW_STATIC_NULL_VARIABLES -JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") -JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) +JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS const ValueTree ValueTree::invalid; -JUCE_END_IGNORE_WARNINGS_GCC_LIKE -JUCE_END_IGNORE_WARNINGS_MSVC +JUCE_END_IGNORE_DEPRECATION_WARNINGS #endif diff --git a/modules/juce_events/interprocess/juce_ConnectedChildProcess.cpp b/modules/juce_events/interprocess/juce_ConnectedChildProcess.cpp index a322b739e4..533a75e308 100644 --- a/modules/juce_events/interprocess/juce_ConnectedChildProcess.cpp +++ b/modules/juce_events/interprocess/juce_ConnectedChildProcess.cpp @@ -149,11 +149,9 @@ void ChildProcessCoordinator::handleConnectionLost() {} void ChildProcessCoordinator::handleMessageFromWorker (const MemoryBlock& mb) { - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") - JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) + JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS handleMessageFromSlave (mb); - JUCE_END_IGNORE_WARNINGS_GCC_LIKE - JUCE_END_IGNORE_WARNINGS_MSVC + JUCE_END_IGNORE_DEPRECATION_WARNINGS } bool ChildProcessCoordinator::sendMessageToWorker (const MemoryBlock& mb) @@ -276,11 +274,9 @@ void ChildProcessWorker::handleConnectionLost() {} void ChildProcessWorker::handleMessageFromCoordinator (const MemoryBlock& mb) { - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") - JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) + JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS handleMessageFromMaster (mb); - JUCE_END_IGNORE_WARNINGS_GCC_LIKE - JUCE_END_IGNORE_WARNINGS_MSVC + JUCE_END_IGNORE_DEPRECATION_WARNINGS } bool ChildProcessWorker::sendMessageToCoordinator (const MemoryBlock& mb) diff --git a/modules/juce_events/native/juce_MessageManager_mac.mm b/modules/juce_events/native/juce_MessageManager_mac.mm index f727616ae9..0777966433 100644 --- a/modules/juce_events/native/juce_MessageManager_mac.mm +++ b/modules/juce_events/native/juce_MessageManager_mac.mm @@ -142,11 +142,11 @@ struct AppDelegateClass final : public ObjCClass { if (notification.userInfo != nil) { - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") + JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS // NSUserNotification is deprecated from macOS 11, but there doesn't seem to be a // replacement for NSApplicationLaunchUserNotificationKey returning a non-deprecated type NSUserNotification* userNotification = notification.userInfo[NSApplicationLaunchUserNotificationKey]; - JUCE_END_IGNORE_WARNINGS_GCC_LIKE + JUCE_END_IGNORE_DEPRECATION_WARNINGS JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wnullable-to-nonnull-conversion") if (userNotification != nil && userNotification.userInfo != nil) diff --git a/modules/juce_graphics/fonts/juce_Font.cpp b/modules/juce_graphics/fonts/juce_Font.cpp index 5641606f1b..b6553ed19e 100644 --- a/modules/juce_graphics/fonts/juce_Font.cpp +++ b/modules/juce_graphics/fonts/juce_Font.cpp @@ -754,11 +754,9 @@ float Font::getDescentInPoints() const { return getDescent() * getHeightToP int Font::getStringWidth (const String& text) const { - JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") + JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS return (int) std::ceil (getStringWidthFloat (text)); - JUCE_END_IGNORE_WARNINGS_GCC_LIKE - JUCE_END_IGNORE_WARNINGS_MSVC + JUCE_END_IGNORE_DEPRECATION_WARNINGS } float Font::getStringWidthFloat (const String& text) const @@ -941,11 +939,9 @@ public: beginTest ("Old constructor from Typeface"); { - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") - JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) + JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS Font f { face }; - JUCE_END_IGNORE_WARNINGS_MSVC - JUCE_END_IGNORE_WARNINGS_GCC_LIKE + JUCE_END_IGNORE_DEPRECATION_WARNINGS expect (f.getTypefaceName() == face->getName()); expect (f.getTypefaceStyle() == face->getStyle()); diff --git a/modules/juce_graphics/images/juce_Image.cpp b/modules/juce_graphics/images/juce_Image.cpp index 112bcce29e..277ebd6bf0 100644 --- a/modules/juce_graphics/images/juce_Image.cpp +++ b/modules/juce_graphics/images/juce_Image.cpp @@ -841,13 +841,11 @@ void ImageEffects::applySingleChannelBoxBlurEffect (int radius, const Image& inp //============================================================================== #if JUCE_ALLOW_STATIC_NULL_VARIABLES -JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") -JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) +JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS const Image Image::null; -JUCE_END_IGNORE_WARNINGS_GCC_LIKE -JUCE_END_IGNORE_WARNINGS_MSVC +JUCE_END_IGNORE_DEPRECATION_WARNINGS #endif diff --git a/modules/juce_graphics/juce_graphics_Harfbuzz.cpp b/modules/juce_graphics/juce_graphics_Harfbuzz.cpp index bc464f9fb8..2653786c7e 100644 --- a/modules/juce_graphics/juce_graphics_Harfbuzz.cpp +++ b/modules/juce_graphics/juce_graphics_Harfbuzz.cpp @@ -34,10 +34,9 @@ #include -JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4100 4127 4189 4244 4245 4265 4267 4309 4310 4312 4456 4457 4458 4459 4701 4702 4706 4996 6001 6011 6239 6244 6246 6262 6297 6313 6319 6326 6336 6385 6386 28251) +JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4100 4127 4189 4244 4245 4265 4267 4309 4310 4312 4456 4457 4458 4459 4701 4702 4706 6001 6011 6239 6244 6246 6262 6297 6313 6319 6326 6336 6385 6386 28251) -JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations", - "-Wcast-function-type", +JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wcast-function-type", "-Wsign-conversion", "-Wzero-as-null-pointer-constant", "-Wformat-pedantic", @@ -56,6 +55,8 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations", "-Woverflow", "-Wimplicit-fallthrough") +JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS + #define HAVE_ATEXIT 1 #if JUCE_LINUX || JUCE_BSD @@ -95,5 +96,6 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations", #undef HAVE_FREETYPE #undef HAVE_CORETEXT +JUCE_END_IGNORE_DEPRECATION_WARNINGS JUCE_END_IGNORE_WARNINGS_GCC_LIKE JUCE_END_IGNORE_WARNINGS_MSVC diff --git a/modules/juce_gui_basics/native/juce_FileChooser_mac.mm b/modules/juce_gui_basics/native/juce_FileChooser_mac.mm index 4987e5f2bb..24c84c8129 100644 --- a/modules/juce_gui_basics/native/juce_FileChooser_mac.mm +++ b/modules/juce_gui_basics/native/juce_FileChooser_mac.mm @@ -103,9 +103,9 @@ public: [panel setTitle: nsTitle]; [panel setReleasedWhenClosed: YES]; - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") + JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS [panel setAllowedFileTypes: createAllowedTypesArray (filters)]; - JUCE_END_IGNORE_WARNINGS_GCC_LIKE + JUCE_END_IGNORE_DEPRECATION_WARNINGS if (! isSave) { diff --git a/modules/juce_gui_basics/native/juce_NSViewComponentPeer_mac.mm b/modules/juce_gui_basics/native/juce_NSViewComponentPeer_mac.mm index 86ea738548..664243a03a 100644 --- a/modules/juce_gui_basics/native/juce_NSViewComponentPeer_mac.mm +++ b/modules/juce_gui_basics/native/juce_NSViewComponentPeer_mac.mm @@ -1460,9 +1460,9 @@ public: if (@available (macOS 10.13, *)) return NSPasteboardTypeFileURL; - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") + JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS return (NSString*) kUTTypeFileURL; - JUCE_END_IGNORE_WARNINGS_GCC_LIKE + JUCE_END_IGNORE_DEPRECATION_WARNINGS }(); return [NSArray arrayWithObjects: type, (NSString*) kPasteboardTypeFileURLPromise, NSPasteboardTypeString, nil]; diff --git a/modules/juce_gui_basics/native/juce_PerScreenDisplayLinks_mac.h b/modules/juce_gui_basics/native/juce_PerScreenDisplayLinks_mac.h index 4e412beb13..dcea884cf9 100644 --- a/modules/juce_gui_basics/native/juce_PerScreenDisplayLinks_mac.h +++ b/modules/juce_gui_basics/native/juce_PerScreenDisplayLinks_mac.h @@ -109,7 +109,7 @@ private: // NSScreen.displayLink(target:selector:) all of which were only introduced in macOS 14+ however, // it's not clear how these methods can be used to replace all use cases -JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") +JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS class ScopedDisplayLink { @@ -188,7 +188,7 @@ private: JUCE_DECLARE_NON_MOVEABLE (ScopedDisplayLink) }; -JUCE_END_IGNORE_WARNINGS_GCC_LIKE +JUCE_END_IGNORE_DEPRECATION_WARNINGS //============================================================================== /* diff --git a/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm b/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm index e2d229f2a2..2d7835d82b 100644 --- a/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm +++ b/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm @@ -115,9 +115,9 @@ static UIInterfaceOrientation getWindowOrientation() return [(UIWindowScene*) scene interfaceOrientation]; } - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") + JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS return [sharedApplication statusBarOrientation]; - JUCE_END_IGNORE_WARNINGS_GCC_LIKE + JUCE_END_IGNORE_DEPRECATION_WARNINGS } struct Orientations diff --git a/modules/juce_gui_basics/native/juce_Windowing_mac.mm b/modules/juce_gui_basics/native/juce_Windowing_mac.mm index 6b18e9de82..9839e5dd8f 100644 --- a/modules/juce_gui_basics/native/juce_Windowing_mac.mm +++ b/modules/juce_gui_basics/native/juce_Windowing_mac.mm @@ -603,12 +603,12 @@ static Image createNSWindowSnapshot (NSWindow* nsWindow) #else - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") + JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS return createImageFromCGImage ((CGImageRef) CFAutorelease (CGWindowListCreateImage (CGRectNull, kCGWindowListOptionIncludingWindow, (CGWindowID) [nsWindow windowNumber], kCGWindowImageBoundsIgnoreFraming))); - JUCE_END_IGNORE_WARNINGS_GCC_LIKE + JUCE_END_IGNORE_DEPRECATION_WARNINGS #endif } diff --git a/modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.cpp b/modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.cpp index 4a83998c50..f9aa7a9b56 100644 --- a/modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.cpp +++ b/modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.cpp @@ -1697,11 +1697,9 @@ void CodeEditorComponent::setFont (const Font& newFont) { font = newFont; - JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") + JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS charWidth = font.getStringWidthFloat ("0"); - JUCE_END_IGNORE_WARNINGS_GCC_LIKE - JUCE_END_IGNORE_WARNINGS_MSVC + JUCE_END_IGNORE_DEPRECATION_WARNINGS lineHeight = roundToInt (font.getHeight()); resized(); diff --git a/modules/juce_gui_extra/native/juce_AppleRemote_mac.mm b/modules/juce_gui_extra/native/juce_AppleRemote_mac.mm index 0b2f5493d7..77d3f43a7e 100644 --- a/modules/juce_gui_extra/native/juce_AppleRemote_mac.mm +++ b/modules/juce_gui_extra/native/juce_AppleRemote_mac.mm @@ -63,9 +63,9 @@ namespace return kIOMainPortDefault; #endif - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") + JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS return kIOMasterPortDefault; - JUCE_END_IGNORE_WARNINGS_GCC_LIKE + JUCE_END_IGNORE_DEPRECATION_WARNINGS }(); if (IOServiceGetMatchingServices (defaultPort, dict, &iter) == kIOReturnSuccess diff --git a/modules/juce_gui_extra/native/juce_PushNotifications_mac.cpp b/modules/juce_gui_extra/native/juce_PushNotifications_mac.cpp index b1a3c81e83..c994beb3bd 100644 --- a/modules/juce_gui_extra/native/juce_PushNotifications_mac.cpp +++ b/modules/juce_gui_extra/native/juce_PushNotifications_mac.cpp @@ -35,7 +35,7 @@ namespace juce { -JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") +JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS namespace PushNotificationsDelegateDetailsOsx { @@ -534,6 +534,6 @@ private: PushNotifications::Settings settings; }; -JUCE_END_IGNORE_WARNINGS_GCC_LIKE +JUCE_END_IGNORE_DEPRECATION_WARNINGS } // namespace juce diff --git a/modules/juce_gui_extra/native/juce_SystemTrayIcon_mac.cpp b/modules/juce_gui_extra/native/juce_SystemTrayIcon_mac.cpp index cad7a62fa1..624282de74 100644 --- a/modules/juce_gui_extra/native/juce_SystemTrayIcon_mac.cpp +++ b/modules/juce_gui_extra/native/juce_SystemTrayIcon_mac.cpp @@ -35,7 +35,7 @@ namespace juce { -JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") +JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS extern NSMenu* createNSMenu (const PopupMenu&, const String& name, int topLevelMenuId, int topLevelIndex, bool addDelegate); @@ -446,6 +446,6 @@ void SystemTrayIconComponent::showDropdownMenu (const PopupMenu& menu) pimpl->statusItemHolder->showMenu (menu); } -JUCE_END_IGNORE_WARNINGS_GCC_LIKE +JUCE_END_IGNORE_DEPRECATION_WARNINGS } // namespace juce diff --git a/modules/juce_gui_extra/native/juce_WebBrowserComponent_linux.cpp b/modules/juce_gui_extra/native/juce_WebBrowserComponent_linux.cpp index f92dfbe4e6..ffea19caa4 100644 --- a/modules/juce_gui_extra/native/juce_WebBrowserComponent_linux.cpp +++ b/modules/juce_gui_extra/native/juce_WebBrowserComponent_linux.cpp @@ -1137,11 +1137,11 @@ private: // Using the non-deprecated webkit_javascript_result_get_js_value() functions seems easier // but returned values fail the JS_IS_VALUE() internal assertion. The example code from the // documentation doesn't seem to work either. - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") + JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS WebKitJavascriptResultUniquePtr jsResult { wk.juce_webkit_web_view_run_javascript_finish (owner->webview, result, &error) }; - JUCE_END_IGNORE_WARNINGS_GCC_LIKE + JUCE_END_IGNORE_DEPRECATION_WARNINGS if (jsResult == nullptr) { diff --git a/modules/juce_gui_extra/native/juce_WebBrowserComponent_mac.mm b/modules/juce_gui_extra/native/juce_WebBrowserComponent_mac.mm index e00ebde534..fcff49f51b 100644 --- a/modules/juce_gui_extra/native/juce_WebBrowserComponent_mac.mm +++ b/modules/juce_gui_extra/native/juce_WebBrowserComponent_mac.mm @@ -197,9 +197,9 @@ struct WebViewKeyEquivalentResponder final : public ObjCClass if (@available (macOS 10.12, *)) return (modifierFlags & NSEventModifierFlagDeviceIndependentFlagsMask) == NSEventModifierFlagCommand; - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") + JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS return (modifierFlags & NSDeviceIndependentModifierFlagsMask) == NSCommandKeyMask; - JUCE_END_IGNORE_WARNINGS_GCC_LIKE + JUCE_END_IGNORE_DEPRECATION_WARNINGS }(); if (isCommandDown) @@ -270,7 +270,7 @@ struct WebViewKeyEquivalentResponder final : public ObjCClass } }; -JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") +JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS struct DownloadClickDetectorClass final : public ObjCClass { DownloadClickDetectorClass() : ObjCClass ("JUCEWebClickDetector_") @@ -372,7 +372,7 @@ private: } } }; -JUCE_END_IGNORE_WARNINGS_GCC_LIKE +JUCE_END_IGNORE_DEPRECATION_WARNINGS #endif // Connects the delegate to the rest of the implementation without making WebViewDelegateClass @@ -652,7 +652,7 @@ window.__JUCE__ = { //============================================================================== #if JUCE_MAC -JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") +JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS class WebBrowserComponent::Impl::Platform::WebViewImpl : public WebBrowserComponent::Impl::PlatformInterface, #if JUCE_MAC public NSViewComponent @@ -783,7 +783,7 @@ private: ObjCObjectHandle webView; ObjCObjectHandle clickListener; }; -JUCE_END_IGNORE_WARNINGS_GCC_LIKE +JUCE_END_IGNORE_DEPRECATION_WARNINGS #endif class WebBrowserComponent::Impl::Platform::WKWebViewImpl : public WebBrowserComponent::Impl::PlatformInterface, diff --git a/modules/juce_opengl/native/juce_OpenGL_mac.h b/modules/juce_opengl/native/juce_OpenGL_mac.h index badc06f207..c5efcc0e87 100644 --- a/modules/juce_opengl/native/juce_OpenGL_mac.h +++ b/modules/juce_opengl/native/juce_OpenGL_mac.h @@ -35,7 +35,7 @@ namespace juce { -JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") +JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS class OpenGLContext::NativeContext { @@ -326,6 +326,6 @@ bool OpenGLHelpers::isContextActive() return CGLGetCurrentContext() != CGLContextObj(); } -JUCE_END_IGNORE_WARNINGS_GCC_LIKE +JUCE_END_IGNORE_DEPRECATION_WARNINGS } // namespace juce diff --git a/modules/juce_product_unlocking/marketplace/juce_OnlineUnlockStatus.cpp b/modules/juce_product_unlocking/marketplace/juce_OnlineUnlockStatus.cpp index 76f44dcd50..478db67fb2 100644 --- a/modules/juce_product_unlocking/marketplace/juce_OnlineUnlockStatus.cpp +++ b/modules/juce_product_unlocking/marketplace/juce_OnlineUnlockStatus.cpp @@ -328,8 +328,7 @@ String OnlineUnlockStatus::MachineIDUtilities::getUniqueMachineID() return getEncodedIDString (SystemStats::getUniqueDeviceID()); } -JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") -JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) +JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS StringArray OnlineUnlockStatus::MachineIDUtilities::getLocalMachineIDs() { @@ -350,8 +349,7 @@ StringArray OnlineUnlockStatus::getLocalMachineIDs() return MachineIDUtilities::getLocalMachineIDs(); } -JUCE_END_IGNORE_WARNINGS_GCC_LIKE -JUCE_END_IGNORE_WARNINGS_MSVC +JUCE_END_IGNORE_DEPRECATION_WARNINGS void OnlineUnlockStatus::userCancelled() { diff --git a/modules/juce_video/native/juce_CameraDevice_mac.h b/modules/juce_video/native/juce_CameraDevice_mac.h index 4a5dc50965..df409217db 100644 --- a/modules/juce_video/native/juce_CameraDevice_mac.h +++ b/modules/juce_video/native/juce_CameraDevice_mac.h @@ -148,9 +148,9 @@ struct CameraDevice::Pimpl { if (@available (macOS 10.15, *)) { - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") + JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS const auto deviceType = AVCaptureDeviceTypeExternalUnknown; - JUCE_END_IGNORE_WARNINGS_GCC_LIKE + JUCE_END_IGNORE_DEPRECATION_WARNINGS auto* discovery = [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes: @[AVCaptureDeviceTypeBuiltInWideAngleCamera, deviceType] mediaType: AVMediaTypeVideo @@ -159,9 +159,9 @@ struct CameraDevice::Pimpl return [discovery devices]; } - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") + JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS return [AVCaptureDevice devicesWithMediaType: AVMediaTypeVideo]; - JUCE_END_IGNORE_WARNINGS_GCC_LIKE + JUCE_END_IGNORE_DEPRECATION_WARNINGS } static StringArray getAvailableDevices() @@ -331,7 +331,7 @@ private: NSUniquePtr> delegate; }; - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") + JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS class PreCatalinaStillImageOutput : public ImageOutputBase { public: @@ -397,7 +397,7 @@ private: private: AVCaptureStillImageOutput* imageOutput = nil; }; - JUCE_END_IGNORE_WARNINGS_GCC_LIKE + JUCE_END_IGNORE_DEPRECATION_WARNINGS //============================================================================== void addImageCapture()