From b83e39a540e470f832adff6d4462bb3522acc5c1 Mon Sep 17 00:00:00 2001 From: Eladash <18193363+elad335@users.noreply.github.com> Date: Sat, 20 Apr 2024 19:34:10 +0300 Subject: [PATCH] Fix some warnings --- Utilities/Thread.h | 6 +++--- rpcs3/Emu/Cell/PPUTranslator.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Utilities/Thread.h b/Utilities/Thread.h index 96b20d6960..052abbac23 100644 --- a/Utilities/Thread.h +++ b/Utilities/Thread.h @@ -868,10 +868,10 @@ public: ~named_thread_group() noexcept { - // Destroy all threads (it should join them) - for (u32 i = m_count - 1; i < m_count; i--) + // Destroy all threads in reverse order (it should join them) + for (u32 i = 0; i < m_count; i++) { - std::launder(m_threads + i)->~Thread(); + std::launder(m_threads + (m_count - i - 1))->~Thread(); } ::operator delete(static_cast(m_threads), std::align_val_t{alignof(Thread)}); diff --git a/rpcs3/Emu/Cell/PPUTranslator.cpp b/rpcs3/Emu/Cell/PPUTranslator.cpp index 22df774e9f..475a936ad8 100644 --- a/rpcs3/Emu/Cell/PPUTranslator.cpp +++ b/rpcs3/Emu/Cell/PPUTranslator.cpp @@ -314,7 +314,7 @@ Function* PPUTranslator::GetSymbolResolver(const ppu_module& info) continue; } - vec_addrs.push_back(f.addr - base); + vec_addrs.push_back(static_cast(f.addr - base)); functions.push_back(cast(m_module->getOrInsertFunction(fmt::format("__0x%x", f.addr - base), ftype).getCallee())); }