From 785e480b62f4ed306e389300a533c73f4e03e2bd Mon Sep 17 00:00:00 2001 From: Danila Malyutin Date: Sat, 2 Sep 2023 21:45:06 +0400 Subject: msvc: set warning level to /W4 globally And fix a bunch of warnings --- src/core/hle/service/nvdrv/core/nvmap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/hle/service/nvdrv') diff --git a/src/core/hle/service/nvdrv/core/nvmap.cpp b/src/core/hle/service/nvdrv/core/nvmap.cpp index a51ca5444..0ca05257e 100644 --- a/src/core/hle/service/nvdrv/core/nvmap.cpp +++ b/src/core/hle/service/nvdrv/core/nvmap.cpp @@ -160,8 +160,8 @@ u32 NvMap::PinHandle(NvMap::Handle::Id handle) { u32 address{}; auto& smmu_allocator = host1x.Allocator(); auto& smmu_memory_manager = host1x.MemoryManager(); - while (!(address = - smmu_allocator.Allocate(static_cast(handle_description->aligned_size)))) { + while ((address = smmu_allocator.Allocate( + static_cast(handle_description->aligned_size))) == 0) { // Free handles until the allocation succeeds std::scoped_lock queueLock(unmap_queue_lock); if (auto freeHandleDesc{unmap_queue.front()}) { -- cgit v1.2.3