diff --git a/rpcs3/Emu/Cell/lv2/sys_usbd.cpp b/rpcs3/Emu/Cell/lv2/sys_usbd.cpp index d5f88ff7e3..0d34251b77 100644 --- a/rpcs3/Emu/Cell/lv2/sys_usbd.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_usbd.cpp @@ -971,7 +971,7 @@ error_code sys_usbd_transfer_data(ppu_thread& ppu, u32 handle, u32 id_pipe, vm:: // Claiming interface switch (request->bmRequestType) { - case LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_STANDARD | LIBUSB_RECIPIENT_DEVICE: + case 0U /*silences warning*/ | LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_STANDARD | LIBUSB_RECIPIENT_DEVICE: { switch (request->bRequest) { @@ -985,7 +985,7 @@ error_code sys_usbd_transfer_data(ppu_thread& ppu, u32 handle, u32 id_pipe, vm:: } break; } - case LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_STANDARD | LIBUSB_RECIPIENT_DEVICE: + case 0U /*silences warning*/ | LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_STANDARD | LIBUSB_RECIPIENT_DEVICE: { if (!buf) { diff --git a/rpcs3/Emu/Io/usb_device.cpp b/rpcs3/Emu/Io/usb_device.cpp index 78d1952e3a..dc1a6ae563 100644 --- a/rpcs3/Emu/Io/usb_device.cpp +++ b/rpcs3/Emu/Io/usb_device.cpp @@ -283,14 +283,14 @@ void usb_device_emulated::control_transfer(u8 bmRequestType, u8 bRequest, u16 wV switch (bmRequestType) { - case LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_STANDARD | LIBUSB_RECIPIENT_DEVICE: + case 0U /*silences warning*/ | LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_STANDARD | LIBUSB_RECIPIENT_DEVICE: switch (bRequest) { case LIBUSB_REQUEST_SET_CONFIGURATION: usb_device::set_configuration(::narrow(wValue)); break; default: sys_usbd.error("Unhandled control transfer(0x%02x): 0x%02x", bmRequestType, bRequest); break; } break; - case LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_STANDARD | LIBUSB_RECIPIENT_DEVICE: + case 0U /*silences warning*/ | LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_STANDARD | LIBUSB_RECIPIENT_DEVICE: switch (bRequest) { case LIBUSB_REQUEST_GET_STATUS: transfer->expected_count = get_status(false, false, buf, buf_size); break; diff --git a/rpcs3/Emu/Memory/vm.cpp b/rpcs3/Emu/Memory/vm.cpp index 91328f5096..919942227f 100644 --- a/rpcs3/Emu/Memory/vm.cpp +++ b/rpcs3/Emu/Memory/vm.cpp @@ -1968,7 +1968,7 @@ namespace vm range_lock->store(begin | (u64{size} << 32)); - for (u64 i = 0;; i++) + while (true) { const u64 lock_val = g_range_lock.load(); const u64 is_share = g_shmem[begin >> 16].load(); diff --git a/rpcs3/Emu/RSX/GL/OpenGL.cpp b/rpcs3/Emu/RSX/GL/OpenGL.cpp index 599f4ca535..ea6935d31f 100644 --- a/rpcs3/Emu/RSX/GL/OpenGL.cpp +++ b/rpcs3/Emu/RSX/GL/OpenGL.cpp @@ -57,6 +57,6 @@ void gl::set_swapinterval(int interval) //No existing drawable or missing swap extension, EGL? rsx_log.error("Failed to set swap interval"); #else - rsx_log.error("Swap control not implemented for this platform. Vsync options not available."); + rsx_log.error("Swap control not implemented for this platform. Vsync options not available. (interval=%d)", interval); #endif } diff --git a/rpcs3/Emu/RSX/Overlays/overlay_controls.cpp b/rpcs3/Emu/RSX/Overlays/overlay_controls.cpp index 83aed317ec..5319683ba2 100644 --- a/rpcs3/Emu/RSX/Overlays/overlay_controls.cpp +++ b/rpcs3/Emu/RSX/Overlays/overlay_controls.cpp @@ -84,26 +84,29 @@ namespace rsx resource_config::resource_config() { - texture_resource_files.emplace_back("fade_top.png"); - texture_resource_files.emplace_back("fade_bottom.png"); - texture_resource_files.emplace_back("select.png"); - texture_resource_files.emplace_back("start.png"); - texture_resource_files.emplace_back("cross.png"); - texture_resource_files.emplace_back("circle.png"); - texture_resource_files.emplace_back("triangle.png"); - texture_resource_files.emplace_back("square.png"); - texture_resource_files.emplace_back("L1.png"); - texture_resource_files.emplace_back("R1.png"); - texture_resource_files.emplace_back("L2.png"); - texture_resource_files.emplace_back("R2.png"); - texture_resource_files.emplace_back("save.png"); - texture_resource_files.emplace_back("new.png"); - texture_resource_files.emplace_back("spinner-24.png"); } void resource_config::load_files() { - for (const auto &res : texture_resource_files) + const std::array texture_resource_files + { + "fade_top.png", + "fade_bottom.png", + "select.png", + "start.png", + "cross.png", + "circle.png", + "triangle.png", + "square.png", + "L1.png", + "R1.png", + "L2.png", + "R2.png", + "save.png", + "new.png", + "spinner-24.png" + }; + for (const std::string& res : texture_resource_files) { // First check the global config dir const std::string image_path = fs::get_config_dir() + "Icons/ui/" + res; diff --git a/rpcs3/Emu/RSX/Overlays/overlay_controls.h b/rpcs3/Emu/RSX/Overlays/overlay_controls.h index c9bd921a42..125b78f37c 100644 --- a/rpcs3/Emu/RSX/Overlays/overlay_controls.h +++ b/rpcs3/Emu/RSX/Overlays/overlay_controls.h @@ -66,7 +66,6 @@ namespace rsx }; // Define resources - std::vector texture_resource_files; std::vector> texture_raw_data; resource_config(); diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index 3bb09d565a..b0fd748e1a 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -3218,7 +3218,10 @@ bool Emulator::IsPathInsideDir(std::string_view path, std::string_view dir) cons return !dir_path.empty() && (GetCallbacks().resolve_path(path) + '/').starts_with((dir_path.back() == '/') ? dir_path : (dir_path + '/')); } -game_boot_result Emulator::VerifyPathCasing(std::string_view path, std::string_view dir, bool from_dir) const +game_boot_result Emulator::VerifyPathCasing( + [[maybe_unused]] std::string_view path, + [[maybe_unused]] std::string_view dir, + [[maybe_unused]] bool from_dir) const { #ifdef _WIN32 // path might be passed from command line with differences in uppercase/lowercase on windows. diff --git a/rpcs3/rpcs3qt/update_manager.cpp b/rpcs3/rpcs3qt/update_manager.cpp index 216f644e00..8fc50081fa 100644 --- a/rpcs3/rpcs3qt/update_manager.cpp +++ b/rpcs3/rpcs3qt/update_manager.cpp @@ -369,6 +369,8 @@ bool update_manager::handle_rpcs3(const QByteArray& data, bool auto_accept) m_downloader->update_progress_dialog(tr("Updating RPCS3")); #ifdef __APPLE__ + Q_UNUSED(data); + Q_UNUSED(auto_accept); update_log.error("Unsupported operating system."); return false; #else diff --git a/rpcs3/util/cpu_stats.cpp b/rpcs3/util/cpu_stats.cpp index 53d01ad558..0f4ded60b1 100644 --- a/rpcs3/util/cpu_stats.cpp +++ b/rpcs3/util/cpu_stats.cpp @@ -111,6 +111,7 @@ namespace utils per_core_usage.resize(utils::get_thread_count()); std::fill(per_core_usage.begin(), per_core_usage.end(), 0.0); +#if defined(_WIN32) || defined(__linux__) const auto string_to_number = [](const std::string& str) -> std::pair { std::add_pointer_t eval; @@ -284,6 +285,7 @@ namespace utils { perf_log.error("Failed to open /proc/stat (%s)", strerror(errno)); } +#endif #else total_usage = get_usage(); #endif diff --git a/rpcs3/util/vm_native.cpp b/rpcs3/util/vm_native.cpp index 3c4b25b50c..b5c45eceaf 100644 --- a/rpcs3/util/vm_native.cpp +++ b/rpcs3/util/vm_native.cpp @@ -622,12 +622,12 @@ namespace utils } #else int vm_overcommit = 0; - auto vm_sz = sizeof(int); #if defined(__NetBSD__) || defined(__APPLE__) // Always ON vm_overcommit = 0; #elif defined(__FreeBSD__) + auto vm_sz = sizeof(int); int mib[2]{CTL_VM, VM_OVERCOMMIT}; if (::sysctl(mib, 2, &vm_overcommit, &vm_sz, NULL, 0) != 0) vm_overcommit = -1;