Skip to content

Commit

Permalink
xpmem: pointer of type ‘void *’ used in arithmetic
Browse files Browse the repository at this point in the history
Cast to uintptr_t

Signed-off-by: Amir Shehata <shehataa@ornl.gov>
  • Loading branch information
amirshehataornl authored and j-xiong committed May 13, 2024
1 parent f41cea5 commit 4ee2cbe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/xpmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,9 @@ int xpmem_copy(struct iovec *local, unsigned long local_cnt,
iov.iov_base = (void *) ofi_get_page_start(remote[i].iov_base,
page_size);
iov.iov_len =
(uintptr_t) ofi_get_page_end(remote[i].iov_base +
remote[i].iov_len, page_size) -
(uintptr_t) ofi_get_page_end(
(void*)((uintptr_t)remote[i].iov_base +
remote[i].iov_len), page_size) -
(uintptr_t)iov.iov_base;

ret = ofi_xpmem_cache_search(xpmem_cache, &iov, pid, &mr_entry,
Expand Down

0 comments on commit 4ee2cbe

Please sign in to comment.