From ef4fe887ed70bbf9d87f334253d9836004cbc498 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 18 Sep 2018 00:42:14 +0200 Subject: [PATCH] Add new DISTRHO_NO_WARNINGS macro, use it on macOS test builds --- .travis/script-macos.sh | 2 +- distrho/src/DistrhoPluginLADSPA+DSSI.cpp | 4 ++-- distrho/src/DistrhoPluginVST.cpp | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.travis/script-macos.sh b/.travis/script-macos.sh index 81188852..76f1776c 100755 --- a/.travis/script-macos.sh +++ b/.travis/script-macos.sh @@ -3,7 +3,7 @@ set -e # Preparation -_FLAGS="-Werror" +_FLAGS="-DDISTRHO_NO_WARNINGS -Werror" export CFLAGS="${_FLAGS}" export CXXFLAGS="${_FLAGS}" export MACOS_OLD=true diff --git a/distrho/src/DistrhoPluginLADSPA+DSSI.cpp b/distrho/src/DistrhoPluginLADSPA+DSSI.cpp index b370da80..6f45decd 100644 --- a/distrho/src/DistrhoPluginLADSPA+DSSI.cpp +++ b/distrho/src/DistrhoPluginLADSPA+DSSI.cpp @@ -30,12 +30,12 @@ # if DISTRHO_PLUGIN_WANT_MIDI_INPUT || DISTRHO_PLUGIN_WANT_MIDI_OUTPUT # error Cannot use MIDI with LADSPA # endif -# if DISTRHO_PLUGIN_WANT_STATE +# if DISTRHO_PLUGIN_WANT_STATE && !defined(DISTRHO_NO_WARNINGS) # warning LADSPA cannot handle states # endif #endif -#if DISTRHO_PLUGIN_WANT_TIMEPOS +#if DISTRHO_PLUGIN_WANT_TIMEPOS && !defined(DISTRHO_NO_WARNINGS) # warning LADSPA/DSSI does not support TimePos #endif diff --git a/distrho/src/DistrhoPluginVST.cpp b/distrho/src/DistrhoPluginVST.cpp index bd537802..e7877506 100644 --- a/distrho/src/DistrhoPluginVST.cpp +++ b/distrho/src/DistrhoPluginVST.cpp @@ -405,7 +405,9 @@ public: # ifdef __LP64__ fUsingNsView = true; # else -# warning 32bit VST UIs on OSX only work if the host supports "hasCockosViewAsConfig" +# ifndef DISTRHO_NO_WARNINGS +# warning 32bit VST UIs on OSX only work if the host supports "hasCockosViewAsConfig" +# endif fUsingNsView = false; # endif # endif // DISTRHO_OS_MAC