Skip to content

Commit

Permalink
[NFC][OpenMP] Fix const cast warning
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalybuka committed Nov 18, 2022
1 parent 4218900 commit a35ad71
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
Expand Up @@ -1749,8 +1749,9 @@ struct DeviceEnvironment {
if (inImage()) {
DP("Setting global device environment before load (%u bytes)\n",
SI.Size);
uint64_t Offset = (char *)SI.Addr - (char *)Image->ImageStart;
void *Pos = (char *)Data + Offset;
uint64_t Offset = reinterpret_cast<const char *>(SI.Addr) -
reinterpret_cast<const char *>(Image->ImageStart);
void *Pos = reinterpret_cast<char *>(Data) + Offset;
memcpy(Pos, &HostDeviceEnv, SI.Size);
}
}
Expand Down

0 comments on commit a35ad71

Please sign in to comment.