From 64fb009695a7e659059d6ea8c36bb23cee141193 Mon Sep 17 00:00:00 2001 From: Daan Leijen Date: Sun, 5 Mar 2023 22:27:45 -0800 Subject: [PATCH] fix warning with zero padding --- src/page.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/page.c b/src/page.c index 3205f975..46dfd26f 100644 --- a/src/page.c +++ b/src/page.c @@ -856,7 +856,9 @@ static mi_page_t* mi_find_page(mi_heap_t* heap, size_t size, size_t huge_alignme } else { // otherwise find a page with free blocks in our size segregated queues - mi_assert_internal((ptrdiff_t)size >= MI_PADDING_SIZE); // cast to signed to avoid error if there is no padding + #if MI_PADDING + mi_assert_internal(size >= MI_PADDING_SIZE); + #endif return mi_find_free_page(heap, size); } }