diff --git a/dgl/NanoVG.hpp b/dgl/NanoVG.hpp index 4a8fd52c..cf693d35 100644 --- a/dgl/NanoVG.hpp +++ b/dgl/NanoVG.hpp @@ -24,6 +24,7 @@ #include "StandaloneWindow.hpp" #ifdef _MSC_VER +# pragma warning(push) # pragma warning(disable:4661) /* instantiated template classes whose methods are defined elsewhere */ #endif @@ -969,7 +970,7 @@ typedef NanoSubWidget NanoWidget; END_NAMESPACE_DGL #ifdef _MSC_VER -# pragma warning(enable:4661) +# pragma warning(pop) #endif #endif // DGL_NANO_WIDGET_HPP_INCLUDED diff --git a/distrho/src/DistrhoPluginInternal.hpp b/distrho/src/DistrhoPluginInternal.hpp index af82b84e..78066fdd 100644 --- a/distrho/src/DistrhoPluginInternal.hpp +++ b/distrho/src/DistrhoPluginInternal.hpp @@ -355,7 +355,7 @@ public: portGroupIndices.erase(kPortGroupNone); - if (const uint32_t portGroupSize = portGroupIndices.size()) + if (const uint32_t portGroupSize = static_cast(portGroupIndices.size())) { fData->portGroups = new PortGroupWithId[portGroupSize]; fData->portGroupCount = portGroupSize; diff --git a/distrho/src/DistrhoUILV2.cpp b/distrho/src/DistrhoUILV2.cpp index 34d0ac92..19df7a1b 100644 --- a/distrho/src/DistrhoUILV2.cpp +++ b/distrho/src/DistrhoUILV2.cpp @@ -285,11 +285,13 @@ protected: tmpStr[std::strlen(key)] = '\0'; // set msg size (key + separator + value + null terminator) - const size_t msgSize = tmpStr.length() + 1U; + const uint32_t msgSize = static_cast(tmpStr.length()) + 1U; // reserve atom space - const size_t atomSize = sizeof(LV2_Atom) + msgSize; + const uint32_t atomSize = sizeof(LV2_Atom) + msgSize; char* const atomBuf = (char*)malloc(atomSize); + DISTRHO_SAFE_ASSERT_RETURN(atomBuf != nullptr,); + std::memset(atomBuf, 0, atomSize); // set atom info