From bff31b3208071d40f9e193ef0cb95fb7aa2db62c Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Wed, 4 May 2022 09:24:03 -0400 Subject: [PATCH] Remove unneeded cast `start` is of type uintptr_t so it does not need to be casted to VALUE. --- gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gc.c b/gc.c index e9ddcb5195457d..c04803d9bce297 100644 --- a/gc.c +++ b/gc.c @@ -2099,7 +2099,7 @@ heap_page_allocate(rb_objspace_t *objspace, rb_size_pool_t *size_pool) /* adjust obj_limit (object number available in this page) */ start = (uintptr_t)((VALUE)page_body + sizeof(struct heap_page_header)); - if ((VALUE)start % BASE_SLOT_SIZE != 0) { + if (start % BASE_SLOT_SIZE != 0) { int delta = BASE_SLOT_SIZE - (start % BASE_SLOT_SIZE); start = start + delta; GC_ASSERT(NUM_IN_PAGE(start) == 0 || NUM_IN_PAGE(start) == 1);