diff --git a/source/modules/dgl/Makefile b/source/modules/dgl/Makefile index 87ec72d24..4ffe22cdf 100644 --- a/source/modules/dgl/Makefile +++ b/source/modules/dgl/Makefile @@ -15,9 +15,6 @@ BUILD_CXX_FLAGS += $(DGL_FLAGS) -Isrc # needed by sofd right now, fix later BUILD_CXX_FLAGS += -Wno-type-limits -fpermissive -# needed by stb_image -BUILD_CXX_FLAGS += -Wno-shift-negative-value - # ---------------------------------------------------------------------------------------------------------------------------- OBJS = \ diff --git a/source/modules/dgl/src/NanoVG.cpp b/source/modules/dgl/src/NanoVG.cpp index 6600428c6..2c2987a6e 100644 --- a/source/modules/dgl/src/NanoVG.cpp +++ b/source/modules/dgl/src/NanoVG.cpp @@ -974,7 +974,8 @@ END_NAMESPACE_DGL #if defined(__GNUC__) && (__GNUC__ >= 6) # pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wno-misleading-indentation" +# pragma GCC diagnostic ignored "-Wmisleading-indentation" +# pragma GCC diagnostic ignored "-Wshift-negative-value" #endif extern "C" { diff --git a/source/modules/dgl/src/Window.cpp b/source/modules/dgl/src/Window.cpp index 3866d8850..5de0a30e1 100644 --- a/source/modules/dgl/src/Window.cpp +++ b/source/modules/dgl/src/Window.cpp @@ -44,7 +44,7 @@ extern "C" { # error Unsupported platform #endif -#if defined(__GNUC__) && (__GNUC__ >= 6) +#if defined(__GNUC__) && (__GNUC__ >= 7) # pragma GCC diagnostic pop #endif diff --git a/source/modules/juce_audio_formats/Makefile b/source/modules/juce_audio_formats/Makefile index ae152fcb0..3d3c93749 100644 --- a/source/modules/juce_audio_formats/Makefile +++ b/source/modules/juce_audio_formats/Makefile @@ -11,7 +11,7 @@ include ../Makefile.mk # ---------------------------------------------------------------------------------------------------------------------------- BUILD_CXX_FLAGS += $(JUCE_AUDIO_FORMATS_FLAGS) -I.. -# BUILD_CXX_FLAGS += -Wno-misleading-indentation -DHAVE_LROUND +BUILD_CXX_FLAGS += -DHAVE_LROUND # ---------------------------------------------------------------------------------------------------------------------------- diff --git a/source/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp b/source/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp index d14833a6f..e2ebd13d8 100644 --- a/source/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp +++ b/source/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp @@ -47,8 +47,11 @@ namespace OggVorbisNamespace #elif JUCE_GCC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wshadow" - #if (__GNUC__ >= 7) - #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" + #if (__GNUC__ >= 6) + #pragma GCC diagnostic ignored "-Wmisleading-indentation" + #if (__GNUC__ >= 7) + #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" + #endif #endif #endif diff --git a/source/native-plugins/Makefile b/source/native-plugins/Makefile index 618148413..e5ddfdc92 100644 --- a/source/native-plugins/Makefile +++ b/source/native-plugins/Makefile @@ -31,7 +31,6 @@ endif # EXPERIMENTAL_PLUGINS ifeq ($(HAVE_ZYN_DEPS),true) ZYN_CXX_FLAGS = $(BUILD_CXX_FLAGS) -Izynaddsubfx -Izynaddsubfx/rtosc -# ZYN_CXX_FLAGS += -Wno-misleading-indentation -Wno-shift-negative-value ZYN_CXX_FLAGS += $(shell pkg-config --cflags fftw3 mxml zlib) ZYN_LD_FLAGS = $(LINK_FLAGS) ZYN_LD_FLAGS += $(shell pkg-config --libs liblo) diff --git a/source/native-plugins/zynaddsubfx-src.cpp b/source/native-plugins/zynaddsubfx-src.cpp index 60aa4c307..a130d06db 100644 --- a/source/native-plugins/zynaddsubfx-src.cpp +++ b/source/native-plugins/zynaddsubfx-src.cpp @@ -21,6 +21,16 @@ #define SOURCE_DIR "/usr/share/zynaddsubfx/examples" #undef override +// ignore some compiler warnings +#if defined(__GNUC__) && (__GNUC__ >= 6) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wshift-negative-value" +#elif defined(__clang__) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Winconsistent-missing-override" +# pragma clang diagnostic ignored "-Wunused-private-field" +#endif + // base c-style headers #include "zynaddsubfx/tlsf/tlsf.h" #include "zynaddsubfx/rtosc/rtosc.h" @@ -44,13 +54,6 @@ extern "C" { #include "zynaddsubfx/rtosc/rtosc.c" } -// ignore some compiler warnings -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Winconsistent-missing-override" -# pragma clang diagnostic ignored "-Wunused-private-field" -#endif - // rtosc includes #include "zynaddsubfx/rtosc/cpp/automations.cpp" #include "zynaddsubfx/rtosc/cpp/midimapper.cpp" @@ -537,7 +540,9 @@ extern "C" { #include "zynaddsubfx/globals.cpp" -#if defined(__clang__) +#if defined(__GNUC__) && (__GNUC__ >= 6) +# pragma GCC diagnostic pop +#elif defined(__clang__) # pragma clang diagnostic pop #endif diff --git a/source/native-plugins/zynaddsubfx-ui.cpp b/source/native-plugins/zynaddsubfx-ui.cpp index 893fa4858..4bf4a57bc 100644 --- a/source/native-plugins/zynaddsubfx-ui.cpp +++ b/source/native-plugins/zynaddsubfx-ui.cpp @@ -50,9 +50,12 @@ extern "C" { # pragma clang diagnostic push # pragma clang diagnostic ignored "-Winconsistent-missing-override" # pragma clang diagnostic ignored "-Wunused-private-field" -#elif defined(__GNUC__) && (__GNUC__ >= 7) +#elif defined(__GNUC__) && (__GNUC__ >= 6) # pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wimplicit-fallthrough" +# pragma GCC diagnostic ignored "-Wmisleading-indentation" +# if (__GNUC__ >= 7) +# pragma GCC diagnostic ignored "-Wimplicit-fallthrough" +# endif #endif // rtosc c++ includes @@ -116,7 +119,7 @@ extern "C" { #if defined(__clang__) # pragma clang diagnostic pop -#elif defined(__GNUC__) && (__GNUC__ >= 7) +#elif defined(__GNUC__) && (__GNUC__ >= 6) # pragma GCC diagnostic pop #endif