From ddd14bc4219898abd647f96da9dededed249e192 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Tue, 16 Feb 2021 17:18:06 -0500 Subject: [PATCH] avoid type comparison warning on some platforms --- h_malloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/h_malloc.c b/h_malloc.c index b07f815..bdc296a 100644 --- a/h_malloc.c +++ b/h_malloc.c @@ -1178,7 +1178,7 @@ static size_t get_large_size_class(size_t size) { // 512 KiB [2560 KiB, 3 MiB, 3584 KiB, 4 MiB] // 1 MiB [5 MiB, 6 MiB, 7 MiB, 8 MiB] // etc. - size = max(size, PAGE_SIZE); + size = max(size, (size_t)PAGE_SIZE); size_t spacing_shift = 64 - __builtin_clzl(size - 1) - 3; size_t spacing_class = 1ULL << spacing_shift; return (size + (spacing_class - 1)) & ~(spacing_class - 1);