diff --git a/Utilities/File.cpp b/Utilities/File.cpp index c5fecc9d14..a7b2a48b72 100644 --- a/Utilities/File.cpp +++ b/Utilities/File.cpp @@ -1707,7 +1707,7 @@ fs::file fs::file::from_native_handle(native_handle handle) fs::file result; #ifdef _WIN32 - result.m_file = std::make_unique((const HANDLE)handle); + result.m_file = std::make_unique(static_cast(handle)); #else result.m_file = std::make_unique(handle); #endif diff --git a/rpcs3/Emu/Cell/Modules/cellAudio.h b/rpcs3/Emu/Cell/Modules/cellAudio.h index 939b7f994c..a88ac6edad 100644 --- a/rpcs3/Emu/Cell/Modules/cellAudio.h +++ b/rpcs3/Emu/Cell/Modules/cellAudio.h @@ -195,7 +195,7 @@ struct audio_port // Handle copy ctor of atomic var audio_port(const audio_port& r) { - std::memcpy(this, &r, sizeof(r)); + std::memcpy(static_cast(this), &r, sizeof(r)); } ENABLE_BITWISE_SERIALIZATION; diff --git a/rpcs3/Emu/RSX/Common/simple_array.hpp b/rpcs3/Emu/RSX/Common/simple_array.hpp index 0fec530852..e2b2661029 100644 --- a/rpcs3/Emu/RSX/Common/simple_array.hpp +++ b/rpcs3/Emu/RSX/Common/simple_array.hpp @@ -174,7 +174,7 @@ namespace rsx { // Switch to heap storage _data = static_cast(std::malloc(sizeof(Ty) * size)); - std::memcpy(_data, _local_storage, size_bytes()); + std::memcpy(static_cast(_data), _local_storage, size_bytes()); } else { diff --git a/rpcs3/Emu/RSX/VK/vkutils/commands.h b/rpcs3/Emu/RSX/VK/vkutils/commands.h index 9ba6af0ccb..65ebfe95b2 100644 --- a/rpcs3/Emu/RSX/VK/vkutils/commands.h +++ b/rpcs3/Emu/RSX/VK/vkutils/commands.h @@ -42,7 +42,7 @@ namespace vk queue_submit_t(const queue_submit_t& other) { - std::memcpy(this, &other, sizeof(queue_submit_t)); + std::memcpy(static_cast(this), &other, sizeof(queue_submit_t)); } inline queue_submit_t& wait_on(VkSemaphore semaphore, VkPipelineStageFlags stage) diff --git a/rpcs3/Emu/RSX/VK/vkutils/graphics_pipeline_state.hpp b/rpcs3/Emu/RSX/VK/vkutils/graphics_pipeline_state.hpp index 96bf576b06..30c1b841e7 100644 --- a/rpcs3/Emu/RSX/VK/vkutils/graphics_pipeline_state.hpp +++ b/rpcs3/Emu/RSX/VK/vkutils/graphics_pipeline_state.hpp @@ -23,7 +23,7 @@ namespace vk graphics_pipeline_state() { // NOTE: Vk** structs have padding bytes - memset(this, 0, sizeof(graphics_pipeline_state)); + memset(static_cast(this), 0, sizeof(graphics_pipeline_state)); ia.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; cs.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO; @@ -43,7 +43,7 @@ namespace vk graphics_pipeline_state(const graphics_pipeline_state& other) { // NOTE: Vk** structs have padding bytes - memcpy(this, &other, sizeof(graphics_pipeline_state)); + memcpy(static_cast(this), &other, sizeof(graphics_pipeline_state)); if (other.cs.pAttachments == other.att_state) { @@ -59,7 +59,7 @@ namespace vk if (this != &other) { // NOTE: Vk** structs have padding bytes - memcpy(this, &other, sizeof(graphics_pipeline_state)); + memcpy(static_cast(this), &other, sizeof(graphics_pipeline_state)); if (other.cs.pAttachments == other.att_state) {