diff --git a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2p.cpp b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2p.cpp index 608088aac6..67cefe3e3e 100644 --- a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2p.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2p.cpp @@ -274,7 +274,7 @@ std::optional lv2_socket_p2p::sendto(s32 flags, const std::vector& buf, } ensure(opt_sn_addr); - ensure(socket); // ensures it has been bound + ensure(native_socket); // ensures it has been bound ensure(buf.size() <= static_cast(65535 - VPORT_P2P_HEADER_SIZE)); // catch games using full payload for future fragmentation implementation if necessary const u16 p2p_port = reinterpret_cast(&*opt_sn_addr)->sin_port; const u16 p2p_vport = reinterpret_cast(&*opt_sn_addr)->sin_vport; diff --git a/rpcs3/Emu/RSX/Common/simple_array.hpp b/rpcs3/Emu/RSX/Common/simple_array.hpp index aa482ef418..24217be42c 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..11f2b834ae 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)); + std::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)); + std::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)); + std::memcpy(static_cast(this), &other, sizeof(graphics_pipeline_state)); if (other.cs.pAttachments == other.att_state) { diff --git a/rpcs3/util/types.hpp b/rpcs3/util/types.hpp index ddc69282dc..690f51c0e7 100644 --- a/rpcs3/util/types.hpp +++ b/rpcs3/util/types.hpp @@ -1210,7 +1210,7 @@ constexpr void write_to_ptr(U&& array, const T& value) { static_assert(sizeof(T) % sizeof(array[0]) == 0); if (!std::is_constant_evaluated()) - std::memcpy(&array[0], &value, sizeof(value)); + std::memcpy(static_cast(&array[0]), &value, sizeof(value)); else ensure(!"Unimplemented"); }