Skip to content

Commit 7792190

Browse files
committed
Fix compile warning
1 parent 680c740 commit 7792190

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

gc/default/default.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7096,7 +7096,7 @@ gc_marks_finish(rb_objspace_t *objspace)
70967096
for (int i = 0; i < HEAP_COUNT; i++) {
70977097
total_heap_bytes += heaps[i].total_slots * heaps[i].slot_size;
70987098
}
7099-
size_t avg_slot_size = total_slots > 0 ? total_heap_bytes / total_slots : heaps[0].slot_size;
7099+
size_t avg_slot_size = total_slots > 0 ? total_heap_bytes / total_slots : (size_t)heaps[0].slot_size;
71007100
heap_allocatable_bytes_expand(objspace, NULL, sweep_slots, total_slots, avg_slot_size);
71017101
}
71027102
}

0 commit comments

Comments
 (0)