From 4ee2cbe31183c340f4fccb61d41f15f3cd662dd0 Mon Sep 17 00:00:00 2001 From: Amir Shehata Date: Tue, 19 Dec 2023 15:27:06 -0500 Subject: [PATCH] =?UTF-8?q?xpmem:=20pointer=20of=20type=20=E2=80=98void=20?= =?UTF-8?q?*=E2=80=99=20used=20in=20arithmetic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cast to uintptr_t Signed-off-by: Amir Shehata --- src/xpmem.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/xpmem.c b/src/xpmem.c index 05f7c547096..799dbde4a09 100644 --- a/src/xpmem.c +++ b/src/xpmem.c @@ -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,