diff --git a/source/tests/ANSI.cpp b/source/tests/ANSI.cpp index b1f3dc90e..31323adf7 100644 --- a/source/tests/ANSI.cpp +++ b/source/tests/ANSI.cpp @@ -16,7 +16,7 @@ */ // still need qt classes check -//#include "CarlaPlugin.hpp" +#include "CarlaPlugin.hpp" //#include "plugin/DssiPlugin.cpp" #if 0 diff --git a/source/utils/CarlaBase64Utils.hpp b/source/utils/CarlaBase64Utils.hpp index 818d0131c..cfc8bf1b5 100644 --- a/source/utils/CarlaBase64Utils.hpp +++ b/source/utils/CarlaBase64Utils.hpp @@ -73,15 +73,14 @@ void carla_base64_encode(const uint8_t* const raw, const size_t len, char* const const uint8_t* rawBytes = (const uint8_t*)raw; uint8_t* encodedBytes = (uint8_t*)encoded; size_t rawBitLen = 8*len; - unsigned int bit; - unsigned int tmp; + size_t bit, tmp; for (bit = 0; bit < rawBitLen; bit += 6) { - tmp = (rawBytes[bit/8] << (bit % 8)) | (rawBytes[bit/8 + 1] >> (8 - (bit % 8))); - tmp = (tmp >> 2) & 0x3f; + tmp = static_cast((rawBytes[bit/8] << (bit % 8)) | (rawBytes[bit/8 + 1] >> (8 - (bit % 8)))); + tmp = static_cast((tmp >> 2) & 0x3f); - *(encodedBytes++) = kBase64[tmp]; + *(encodedBytes++) = static_cast(kBase64[tmp]); } for (; (bit % 8) != 0; bit += 6) @@ -155,7 +154,7 @@ unsigned int carla_base64_decode(const char* const encoded, uint8_t* const raw) return 0; } - int decoded = match - kBase64; + uint8_t decoded = static_cast(match - kBase64); /* Add to raw data */ decoded <<= 2; diff --git a/source/utils/CarlaString.hpp b/source/utils/CarlaString.hpp index 349cd8f26..4dd39e3d5 100644 --- a/source/utils/CarlaString.hpp +++ b/source/utils/CarlaString.hpp @@ -50,7 +50,7 @@ public: explicit CarlaString(const int value) { - const size_t strBufSize = std::abs(value/10) + 3; + const size_t strBufSize = static_cast(std::abs(value/10) + 3); char strBuf[strBufSize]; std::snprintf(strBuf, strBufSize, "%d", value); @@ -70,7 +70,7 @@ public: explicit CarlaString(const long int value) { - const size_t strBufSize = std::abs(value/10) + 3; + const size_t strBufSize = static_cast(std::abs(value/10) + 3); char strBuf[strBufSize]; std::snprintf(strBuf, strBufSize, "%ld", value);