From 9d8df7e122c688551d245775ded7130edbc0d295 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 19 Sep 2021 11:57:01 +0100 Subject: [PATCH] Fix some compiler warnings Signed-off-by: falkTX --- distrho/src/DistrhoDefines.h | 6 ++++++ distrho/src/DistrhoPluginInternal.hpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/distrho/src/DistrhoDefines.h b/distrho/src/DistrhoDefines.h index 615550f8..afff900e 100644 --- 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 index 43067d0b..011936a6 100644 --- 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