Skip to content

Commit 5612998

Browse files
committed
memory/patcher: cast away const in shmdt hook
The opal_mem_hooks_release_hook does not have const on the pointer (though it probably should). This commit eliminates a warning by casting away the const until opal_mem_hooks_release_hook is updated to use const. Signed-off-by: Nathan Hjelm <[email protected]>
1 parent 8ab88f2 commit 5612998

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

opal/mca/memory/patcher/memory_patcher_component.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,9 @@ static int intercept_shmdt (const void *shmaddr)
344344
OPAL_PATCHER_BEGIN;
345345
int result;
346346

347-
opal_mem_hooks_release_hook (shmaddr, memory_patcher_get_shm_seg_size (shmaddr), false);
347+
/* opal_mem_hooks_release_hook should probably be updated to take a const void *.
348+
* for now just cast away the const */
349+
opal_mem_hooks_release_hook ((void *) shmaddr, memory_patcher_get_shm_seg_size (shmaddr), false);
348350

349351
if (original_shmdt) {
350352
result = original_shmdt (shmaddr);

0 commit comments

Comments
 (0)