diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-11-30 14:14:03 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-11-30 14:14:03 +0900 |
| commit | 806e554cc027b71cf0970fd4eb8f9ee5f1ccf128 (patch) | |
| tree | e85a132736ce5410337cf4ea890fddff4745eb95 | |
| parent | 3bd9583a52e9c3f55adb2097a84c4adb09cf74a3 (diff) | |
Compare with the upper bound of the loop variable
Fix sign-compare warning
| -rw-r--r-- | gc/default/default.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gc/default/default.c b/gc/default/default.c index 530fc4df89..2d862b0b21 100644 --- a/gc/default/default.c +++ b/gc/default/default.c @@ -9448,7 +9448,7 @@ rb_gc_impl_objspace_init(void *objspace_ptr) (bits_t)0x0101010101010101ULL, // i=3: every 8th bit (bits_t)0x0001000100010001ULL, // i=4: every 16th bit }; - GC_ASSERT(i < sizeof(slot_bits_masks) / sizeof(slot_bits_masks[0])); + GC_ASSERT(HEAP_COUNT == sizeof(slot_bits_masks) / sizeof(slot_bits_masks[0])); heap->slot_bits_mask = slot_bits_masks[i]; ccan_list_head_init(&heap->pages); |
