diff --git a/runtime/hsa-runtime/libamdhsacode/amd_core_dump.cpp b/runtime/hsa-runtime/libamdhsacode/amd_core_dump.cpp index 873d637b77..c5dc75bad6 100644 --- a/runtime/hsa-runtime/libamdhsacode/amd_core_dump.cpp +++ b/runtime/hsa-runtime/libamdhsacode/amd_core_dump.cpp @@ -268,7 +268,8 @@ struct LoadSegmentBuilder : public SegmentBuilder { size_t done = 0; ssize_t read; do { - read = pread(fd_, buf + done, buf_size - done, offset + done); + read = pread(fd_, static_cast(buf) + done, buf_size - done, + offset + done); if (read == -1 && errno != EINTR) { perror("Failed to read GPU memory");