From e5de33dd9ab22da4426068f682b92ee45731acb3 Mon Sep 17 00:00:00 2001 From: Sean Keely Date: Thu, 28 Mar 2019 12:23:46 -0500 Subject: [PATCH] Fix void* arithmetic. GCC allows arithmetic on void* treating void as char. Clang and the language spec does not. Change-Id: I939f2432f276979bb81881406e10528597ac6001 --- runtime/hsa-runtime/core/runtime/amd_blit_sdma.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/hsa-runtime/core/runtime/amd_blit_sdma.cpp b/runtime/hsa-runtime/core/runtime/amd_blit_sdma.cpp index 990480ffd2..4aab983ede 100644 --- a/runtime/hsa-runtime/core/runtime/amd_blit_sdma.cpp +++ b/runtime/hsa-runtime/core/runtime/amd_blit_sdma.cpp @@ -455,8 +455,8 @@ hsa_status_t BlitSdma::SubmitC hsa_dim3_t Doff = *dst_offset; hsa_dim3_t Range = *range; - Src.base += Soff.z * Src.slice + Soff.y * Src.pitch; - Dst.base += Doff.z * Dst.slice + Doff.y * Dst.pitch; + Src.base = static_cast(Src.base) + Soff.z * Src.slice + Soff.y * Src.pitch; + Dst.base = static_cast(Dst.base) + Doff.z * Dst.slice + Doff.y * Dst.pitch; Soff.y = Soff.z = 0; Doff.y = Doff.z = 0;