From 5dfc1b8a666c13275a16915f17eebe2a9028f466 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 26 Sep 2017 09:43:30 +0200 Subject: [PATCH] Silence a few warnings in juce code --- .../juce_audio_formats/codecs/juce_FlacAudioFormat.cpp | 5 +++++ .../juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp | 3 +++ source/modules/juce_core/native/juce_posix_SharedCode.h | 2 ++ .../juce_core/zip/juce_GZIPDecompressorInputStream.cpp | 5 +++++ 4 files changed, 15 insertions(+) diff --git a/source/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp b/source/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp index 05c3c44ea..d46843229 100644 --- a/source/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp +++ b/source/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp @@ -117,6 +117,9 @@ namespace FlacNamespace #pragma clang diagnostic ignored "-Wconversion" #pragma clang diagnostic ignored "-Wshadow" #pragma clang diagnostic ignored "-Wdeprecated-register" + #elif JUCE_GCC && (__GNUC__ >= 6) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" #endif #if JUCE_INTEL @@ -157,6 +160,8 @@ namespace FlacNamespace #if JUCE_CLANG #pragma clang diagnostic pop + #elif JUCE_GCC && (__GNUC__ >= 6) + #pragma GCC diagnostic pop #endif } diff --git a/source/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp b/source/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp index 0a2737bca..fa922b8d5 100644 --- a/source/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp +++ b/source/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp @@ -47,6 +47,9 @@ namespace OggVorbisNamespace #elif JUCE_GCC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wshadow" + #if (__GNUC__ >= 6) + #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" + #endif #endif #include "oggvorbis/vorbisenc.h" diff --git a/source/modules/juce_core/native/juce_posix_SharedCode.h b/source/modules/juce_core/native/juce_posix_SharedCode.h index 67c884ab1..100d41a86 100644 --- a/source/modules/juce_core/native/juce_posix_SharedCode.h +++ b/source/modules/juce_core/native/juce_posix_SharedCode.h @@ -1205,6 +1205,8 @@ public: close (pipeHandles[1]); // close the write handle } } + + ignoreUnused (streamFlags); } ~ActiveProcess() diff --git a/source/modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp b/source/modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp index 0bae4d39d..fa79c4983 100644 --- a/source/modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp +++ b/source/modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp @@ -39,6 +39,9 @@ namespace zlibNamespace #if __has_warning("-Wcomma") #pragma clang diagnostic ignored "-Wcomma" #endif + #elif JUCE_GCC && (__GNUC__ >= 6) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" #endif #undef OS_CODE @@ -74,6 +77,8 @@ namespace zlibNamespace #if JUCE_CLANG #pragma clang diagnostic pop + #elif JUCE_GCC && (__GNUC__ >= 6) + #pragma GCC diagnostic pop #endif #else #include JUCE_ZLIB_INCLUDE_PATH