DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit 9d8df7e122c688551d245775ded7130edbc0d295
parent 96dcfa87d7bc3e7ec7f2fd358c2ffe4eea7fa21f
Author: falkTX <falktx@falktx.com>
Date:   Sun, 19 Sep 2021 11:56:34 +0100

Fix some compiler warnings

Signed-off-by: falkTX <falktx@falktx.com>

Diffstat:
Mdistrho/src/DistrhoDefines.h | 6++++++
Mdistrho/src/DistrhoPluginInternal.hpp | 2+-
2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/distrho/src/DistrhoDefines.h b/distrho/src/DistrhoDefines.h @@ -193,6 +193,12 @@ private: \ # define DISTRHO_OS_SPLIT_STR ":" #endif +/* MSVC warnings */ +#ifdef _MSC_VER +# define strdup _strdup +# pragma warning(disable:4244) /* possible loss of data */ +#endif + /* Useful typedefs */ typedef unsigned char uchar; typedef unsigned short int ushort; diff --git a/distrho/src/DistrhoPluginInternal.hpp b/distrho/src/DistrhoPluginInternal.hpp @@ -249,7 +249,7 @@ public: /* Verify that virtual functions are overriden if parameters, programs or states are in use. * This does not work on all compilers, but we use it purely as informational check anyway. */ -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__clang__) # ifdef DPF_ABORT_ON_ERROR # define DPF_ABORT abort(); # else