From b8cacab8b8532f0b592296b3a9341710220f970d Mon Sep 17 00:00:00 2001 From: Stefano D'Angelo Date: Wed, 22 May 2024 08:38:41 +0200 Subject: [PATCH] lv2/vst3: fix warnings and add needed header --- templates/lv2/src/lv2.c | 22 ++++++++++++---------- templates/vst3/src/vst3.c | 22 +++++++++++++++++++++- 2 files changed, 33 insertions(+), 11 deletions(-) diff --git a/templates/lv2/src/lv2.c b/templates/lv2/src/lv2.c index c581d42..bf919d3 100644 --- a/templates/lv2/src/lv2.c +++ b/templates/lv2/src/lv2.c @@ -37,21 +37,23 @@ typedef struct { #include "lv2/core/lv2.h" #if DATA_PRODUCT_MIDI_INPUTS_N + DATA_PRODUCT_MIDI_OUTPUTS_N > 0 -#include "lv2/core/lv2_util.h" -#include "lv2/atom/util.h" -#include "lv2/atom/atom.h" -#include "lv2/log/log.h" -#include "lv2/log/logger.h" -#include "lv2/midi/midi.h" -#include "lv2/urid/urid.h" +# include "lv2/core/lv2_util.h" +# include "lv2/atom/util.h" +# include "lv2/atom/atom.h" +# include "lv2/log/log.h" +# include "lv2/log/logger.h" +# include "lv2/midi/midi.h" +# include "lv2/urid/urid.h" #endif #ifdef DATA_UI -#include "lv2/ui/ui.h" +# include "lv2/ui/ui.h" + +# include #endif #if defined(__i386__) || defined(__x86_64__) -#include -#include +# include +# include #endif static inline float clampf(float x, float m, float M) { diff --git a/templates/vst3/src/vst3.c b/templates/vst3/src/vst3.c index bb83edc..e44fe9c 100644 --- a/templates/vst3/src/vst3.c +++ b/templates/vst3/src/vst3.c @@ -97,7 +97,8 @@ typedef struct Steinberg_IEventHandler struct Steinberg_IEventHandlerVtbl* lpVtbl; } Steinberg_IEventHandler; -static const Steinberg_TUID Steinberg_IEventHandler_iid = SMTG_INLINE_UID (0x561E65C9, 0x13A0496F, 0x813A2C35, 0x654D7983); +// not used +//static const Steinberg_TUID Steinberg_IEventHandler_iid = SMTG_INLINE_UID (0x561E65C9, 0x13A0496F, 0x813A2C35, 0x654D7983); typedef struct Steinberg_IRunLoopVtbl { @@ -1090,18 +1091,31 @@ static Steinberg_tresult plugViewRemoved(void* thisInterface) { } static Steinberg_tresult plugViewOnWheel(void* thisInterface, float distance) { + (void)thisInterface; + (void)distance; + TRACE("plugView onWheel %p\n", thisInterface); //TODO return Steinberg_kResultFalse; } static Steinberg_tresult plugViewOnKeyDown(void* thisInterface, Steinberg_char16 key, Steinberg_int16 keyCode, Steinberg_int16 modifiers) { + (void)thisInterface; + (void)key; + (void)keyCode; + (void)modifiers; + TRACE("plugView onKeyDown %p\n", thisInterface); //TODO return Steinberg_kResultFalse; } static Steinberg_tresult plugViewOnKeyUp(void* thisInterface, Steinberg_char16 key, Steinberg_int16 keyCode, Steinberg_int16 modifiers) { + (void)thisInterface; + (void)key; + (void)keyCode; + (void)modifiers; + TRACE("plugView onKeyUp %p\n", thisInterface); //TODO return Steinberg_kResultFalse; @@ -1145,6 +1159,9 @@ static Steinberg_tresult plugViewOnSize(void* thisInterface, struct Steinberg_Vi } static Steinberg_tresult plugViewOnFocus(void* thisInterface, Steinberg_TBool state) { + (void)thisInterface; + (void)state; + TRACE("plugView onFocus %p\n", thisInterface); //TODO return Steinberg_kResultFalse; @@ -1176,6 +1193,9 @@ static Steinberg_tresult plugViewCanResize(void* thisInterface) { } static Steinberg_tresult plugViewCheckSizeConstraint(void* thisInterface, struct Steinberg_ViewRect* rect) { + (void)thisInterface; + (void)rect; + TRACE("plugView chekSizeContraint %p\n", thisInterface); //TODO return Steinberg_kResultFalse;