Fix a "possible loss of data" warning

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2023-05-06 15:32:59 +02:00
parent 48994f6522
commit 5d2d9a70d9
No known key found for this signature in database
GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 2 additions and 1 deletions

View File

@ -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<DWORD>(size), shm.filename);
if (map == nullptr || map == INVALID_HANDLE_VALUE)
{