diff --git a/src/effects/VST/VSTEffect.cpp b/src/effects/VST/VSTEffect.cpp
index 3cd95bd1c339ea1a744849562f387161d8be3ea2..b69547e22e6444c676c3eca98754139743da7183 100644
--- a/src/effects/VST/VSTEffect.cpp
+++ b/src/effects/VST/VSTEffect.cpp
@@ -1110,7 +1110,9 @@ void VSTEffect::BundleDeleter::operator() (void* p) const
 void VSTEffect::ResourceDeleter::operator() (void *p) const
 {
    if (mpHandle) {
-      int resource = (int)p;
+      // take a detour to avoid a "fatal warning" about losing data downcasting a void* to int
+      size_t dum = size_t(p);
+      int resource = int(dum);
       CFBundleCloseBundleResourceMap(mpHandle->get(), resource);
    }
 }