From 5d2d9a70d98cd768508ed7eb44481b10b56db9cd Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 6 May 2023 15:32:59 +0200 Subject: [PATCH] Fix a "possible loss of data" warning Signed-off-by: falkTX --- source/utils/CarlaShmUtils.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/utils/CarlaShmUtils.hpp b/source/utils/CarlaShmUtils.hpp index 6d6a74e89..54cef8288 100644 --- a/source/utils/CarlaShmUtils.hpp +++ b/source/utils/CarlaShmUtils.hpp @@ -178,7 +178,8 @@ void* carla_shm_map(carla_shm_t& shm, const std::size_t size) noexcept sa.nLength = sizeof(sa); sa.bInheritHandle = TRUE; - map = ::CreateFileMappingA(INVALID_HANDLE_VALUE, &sa, PAGE_READWRITE|SEC_COMMIT, 0, size, shm.filename); + map = ::CreateFileMappingA(INVALID_HANDLE_VALUE, &sa, + PAGE_READWRITE|SEC_COMMIT, 0, static_cast(size), shm.filename); if (map == nullptr || map == INVALID_HANDLE_VALUE) {