openmpi3/memory-patcher-fix-compiler-warning.patch

25 lines
991 B
Diff

commit a0242346788a31050effb025b43da5f3e6a1bb9b
Author: Maxwell Coil <mcoil@nd.edu>
Date: Sun Dec 8 13:56:00 2019 -0500
memory/patcher: fix compiler warning
syscall() returns a long, but we are invoking shmat(), which returns
a void*.
Signed-off-by: Maxwell Coil <mcoil@nd.edu>
diff --git opal/mca/memory/patcher/memory_patcher_component.c opal/mca/memory/patcher/memory_patcher_component.c
index 687d430fa362..272ec721225b 100644
--- opal/mca/memory/patcher/memory_patcher_component.c
+++ opal/mca/memory/patcher/memory_patcher_component.c
@@ -440,7 +440,7 @@ static void *_intercept_shmat(int shmid, const void *shmaddr, int shmflg)
if (!original_shmat) {
#if defined(SYS_shmat)
- result = memory_patcher_syscall(SYS_shmat, shmid, shmaddr, shmflg);
+ result = (void*) memory_patcher_syscall(SYS_shmat, shmid, shmaddr, shmflg);
#else // IPCOP_shmat
unsigned long ret;
ret = memory_patcher_syscall(SYS_ipc, IPCOP_shmat,