diff --git a/examples/common/nanovg/nanovg.cpp b/examples/common/nanovg/nanovg.cpp index 3a0af013e..ea06f1ca9 100644 --- a/examples/common/nanovg/nanovg.cpp +++ b/examples/common/nanovg/nanovg.cpp @@ -26,13 +26,13 @@ #include BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4701) // error C4701: potentially uninitialized local variable 'cint' used -// -Wunused-function and 4505 must be file scope, can't be disabled between push/pop. -BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wunused-function"); +BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wunused-function"); // -Wunused-function and 4505 must be file scope, can't be disabled between push/pop. BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4505) // error C4505: '' : unreferenced local function has been removed BX_PRAGMA_DIAGNOSTIC_PUSH(); BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wunused-parameter"); BX_PRAGMA_DIAGNOSTIC_IGNORED_GCC("-Wunused-result"); +BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4244); //" warning C4244: 'argument': conversion from 'double' to 'float', possible loss of data #define FONTSTASH_IMPLEMENTATION #include "fontstash.h" BX_PRAGMA_DIAGNOSTIC_POP(); diff --git a/src/renderer_vk.cpp b/src/renderer_vk.cpp index 894f8973e..81dd90d6e 100644 --- a/src/renderer_vk.cpp +++ b/src/renderer_vk.cpp @@ -4379,7 +4379,7 @@ VK_IMPORT_DEVICE { // Check LRU cache. int memoryType = selectMemoryType(requirements->memoryTypeBits, propertyFlags, 0); - bool found = m_memoryLru.find(requirements->size, memoryType, memory); + bool found = m_memoryLru.find(bx::narrowCast(requirements->size), memoryType, memory); if (found) { return VK_SUCCESS; @@ -4404,7 +4404,7 @@ VK_IMPORT_DEVICE BGFX_PROFILER_SCOPE("vkAllocateMemory", kColorResource); ma.memoryTypeIndex = searchIndex; memory->memoryTypeIndex = searchIndex; - memory->size = ma.allocationSize; + memory->size = bx::narrowCast(ma.allocationSize); memory->offset = 0; result = vkAllocateMemory(m_device, &ma, m_allocatorCb, &memory->mem); } @@ -4750,7 +4750,7 @@ VK_DESTROY // with a handful of tiny allocations. if (alloc.size >= _size && _size * 2 >= alloc.size) { - uint32_t waste = alloc.size - _size; + uint32_t waste = bx::narrowCast(alloc.size - _size); if (waste < bestWaste) { bestIdx = slot;