fix Clang warnings

This commit is contained in:
oltolm 2025-03-08 12:00:38 +01:00
parent ff40128df6
commit be31502ea2
5 changed files with 7 additions and 7 deletions

View file

@ -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<windows_file>((const HANDLE)handle);
result.m_file = std::make_unique<windows_file>(static_cast<const HANDLE>(handle));
#else
result.m_file = std::make_unique<unix_file>(handle);
#endif

View file

@ -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<void*>(this), &r, sizeof(r));
}
ENABLE_BITWISE_SERIALIZATION;

View file

@ -174,7 +174,7 @@ namespace rsx
{
// Switch to heap storage
_data = static_cast<Ty*>(std::malloc(sizeof(Ty) * size));
std::memcpy(_data, _local_storage, size_bytes());
std::memcpy(static_cast<void*>(_data), _local_storage, size_bytes());
}
else
{

View file

@ -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<void*>(this), &other, sizeof(queue_submit_t));
}
inline queue_submit_t& wait_on(VkSemaphore semaphore, VkPipelineStageFlags stage)

View file

@ -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<void*>(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<void*>(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<void*>(this), &other, sizeof(graphics_pipeline_state));
if (other.cs.pAttachments == other.att_state)
{