From b09970f1591fe1c6cc14b2861f28837e907cac90 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sun, 9 May 2021 08:05:48 +0100 Subject: [PATCH] couple of warning build fixes --- Utilities/Thread.cpp | 5 +++-- rpcs3/Emu/RSX/VK/vkutils/swapchain.hpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index 769ad54f9f..a97c5a0914 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -2230,7 +2230,7 @@ thread_state thread_ctrl::state() return static_cast(_this->m_sync & 3); } -void thread_ctrl::_wait_for(u64 usec, bool alert /* true */) +void thread_ctrl::_wait_for(u64 usec, [[maybe_unused]] bool alert /* true */) { auto _this = g_tls_this_thread; @@ -2983,14 +2983,15 @@ std::pair thread_ctrl::get_thread_stack() #else void* saddr = 0; usz ssize = 0; - pthread_attr_t attr; #if defined(__linux__) + pthread_attr_t attr; pthread_getattr_np(pthread_self(), &attr); pthread_attr_getstack(&attr, &saddr, &ssize); #elif defined(__APPLE__) saddr = pthread_get_stackaddr_np(pthread_self()); ssize = pthread_get_stacksize_np(pthread_self()); #else + pthread_attr_t attr; pthread_attr_get_np(pthread_self(), &attr); pthread_attr_getstackaddr(&attr, &saddr); pthread_attr_getstacksize(&attr, &ssize); diff --git a/rpcs3/Emu/RSX/VK/vkutils/swapchain.hpp b/rpcs3/Emu/RSX/VK/vkutils/swapchain.hpp index c8bd84a0ed..ba58a37cf8 100644 --- a/rpcs3/Emu/RSX/VK/vkutils/swapchain.hpp +++ b/rpcs3/Emu/RSX/VK/vkutils/swapchain.hpp @@ -280,7 +280,7 @@ namespace vk dev.destroy(); } - VkResult present(VkSemaphore /*semaphore*/, u32 index) override + VkResult present(VkSemaphore /*semaphore*/, u32 /*index*/) override { fmt::throw_exception("Native macOS swapchain is not implemented yet!"); }