Skip to content

Commit 70dddac

Browse files
authored
Merge pull request #5023 from rgommers/fix-warnings
Fix two compiler warnings in `memory.c`
2 parents d3cc8c6 + 765ad8b commit 70dddac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

driver/others/memory.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2538,7 +2538,7 @@ static void *alloc_shm(void *address){
25382538
}
25392539
#endif
25402540

2541-
#if defined OS_LINUX || defined OS_AIX || defined __sun__ || defined OS_WINDOWS
2541+
#if ((defined ALLOC_HUGETLB) && (defined OS_LINUX || defined OS_AIX || defined __sun__ || defined OS_WINDOWS))
25422542

25432543
static void alloc_hugetlb_free(struct release_t *release){
25442544

@@ -3254,7 +3254,7 @@ void blas_shutdown(void){
32543254
#endif
32553255
newmemory[pos].lock = 0;
32563256
}
3257-
free(newmemory);
3257+
free((void*)newmemory);
32583258
newmemory = NULL;
32593259
memory_overflowed = 0;
32603260
}

0 commit comments

Comments
 (0)