1
1

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 <hjelmn@lanl.gov>
Этот коммит содержится в:
Nathan Hjelm 2016-04-25 15:32:11 -06:00
родитель 8ab88f2051
Коммит 5612998d21

Просмотреть файл

@ -344,7 +344,9 @@ static int intercept_shmdt (const void *shmaddr)
OPAL_PATCHER_BEGIN;
int result;
opal_mem_hooks_release_hook (shmaddr, memory_patcher_get_shm_seg_size (shmaddr), false);
/* opal_mem_hooks_release_hook should probably be updated to take a const void *.
* for now just cast away the const */
opal_mem_hooks_release_hook ((void *) shmaddr, memory_patcher_get_shm_seg_size (shmaddr), false);
if (original_shmdt) {
result = original_shmdt (shmaddr);