diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-09-06 15:12:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-06 15:12:58 +0200 |
commit | 5e424d791bd98c18a81a36405a419237abcc8116 (patch) | |
tree | dd83795955a607612d27f324bdb1bfab63de2c38 /src/core | |
parent | Merge pull request #11437 from liamwhite/dump-shenanigans (diff) | |
parent | msvc: set warning level to /W4 globally (diff) | |
download | yuzu-5e424d791bd98c18a81a36405a419237abcc8116.tar yuzu-5e424d791bd98c18a81a36405a419237abcc8116.tar.gz yuzu-5e424d791bd98c18a81a36405a419237abcc8116.tar.bz2 yuzu-5e424d791bd98c18a81a36405a419237abcc8116.tar.lz yuzu-5e424d791bd98c18a81a36405a419237abcc8116.tar.xz yuzu-5e424d791bd98c18a81a36405a419237abcc8116.tar.zst yuzu-5e424d791bd98c18a81a36405a419237abcc8116.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/hle/kernel/k_capabilities.cpp | 1 | ||||
-rw-r--r-- | src/core/hle/service/nvdrv/core/nvmap.cpp | 4 | ||||
-rw-r--r-- | src/core/hle/service/ssl/ssl_backend_schannel.cpp | 3 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/kernel/k_capabilities.cpp b/src/core/hle/kernel/k_capabilities.cpp index 90e4e8fb0..e7da7a21d 100644 --- a/src/core/hle/kernel/k_capabilities.cpp +++ b/src/core/hle/kernel/k_capabilities.cpp @@ -156,7 +156,6 @@ Result KCapabilities::MapIoPage_(const u32 cap, KPageTable* page_table) { const u64 phys_addr = MapIoPage{cap}.address.Value() * PageSize; const size_t num_pages = 1; const size_t size = num_pages * PageSize; - R_UNLESS(num_pages != 0, ResultInvalidSize); R_UNLESS(phys_addr < phys_addr + size, ResultInvalidAddress); R_UNLESS(((phys_addr + size - 1) & ~PhysicalMapAllowedMask) == 0, ResultInvalidAddress); 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<u32>(handle_description->aligned_size)))) { + while ((address = smmu_allocator.Allocate( + static_cast<u32>(handle_description->aligned_size))) == 0) { // Free handles until the allocation succeeds std::scoped_lock queueLock(unmap_queue_lock); if (auto freeHandleDesc{unmap_queue.front()}) { diff --git a/src/core/hle/service/ssl/ssl_backend_schannel.cpp b/src/core/hle/service/ssl/ssl_backend_schannel.cpp index d834a0c1f..212057cfc 100644 --- a/src/core/hle/service/ssl/ssl_backend_schannel.cpp +++ b/src/core/hle/service/ssl/ssl_backend_schannel.cpp @@ -477,7 +477,8 @@ public: return ResultInternalError; } PCCERT_CONTEXT some_cert = nullptr; - while ((some_cert = CertEnumCertificatesInStore(returned_cert->hCertStore, some_cert))) { + while ((some_cert = CertEnumCertificatesInStore(returned_cert->hCertStore, some_cert)) != + nullptr) { out_certs->emplace_back(static_cast<u8*>(some_cert->pbCertEncoded), static_cast<u8*>(some_cert->pbCertEncoded) + some_cert->cbCertEncoded); |