Skip to content

Commit

Permalink
Remove unused variable in imemo.c
Browse files Browse the repository at this point in the history
The variable klass is only used in debug builds and generates a warning
on non-debug builds.
  • Loading branch information
peterzhu2118 committed Feb 22, 2024
1 parent a16fefc commit 9d8d029
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions imemo.c
Expand Up @@ -182,7 +182,6 @@ static enum rb_id_table_iterator_result
cc_table_mark_i(ID id, VALUE ccs_ptr, void *data)
{
struct rb_class_cc_entries *ccs = (struct rb_class_cc_entries *)ccs_ptr;
VALUE klass = (VALUE)data;
VM_ASSERT(vm_ccs_p(ccs));
VM_ASSERT(id == ccs->cme->called_id);

Expand All @@ -194,7 +193,7 @@ cc_table_mark_i(ID id, VALUE ccs_ptr, void *data)
rb_gc_mark_movable((VALUE)ccs->cme);

for (int i=0; i<ccs->len; i++) {
VM_ASSERT(klass == ccs->entries[i].cc->klass);
VM_ASSERT((VALUE)data == ccs->entries[i].cc->klass);
VM_ASSERT(vm_cc_check_cme(ccs->entries[i].cc, ccs->cme));

rb_gc_mark_movable((VALUE)ccs->entries[i].ci);
Expand Down

0 comments on commit 9d8d029

Please sign in to comment.