From 8d6dbecc80d998c0d801c42aa38c5713e8b53572 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 19 Oct 2021 17:09:32 +0900 Subject: [PATCH] Remove useless casts --- vm_insnhelper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vm_insnhelper.c b/vm_insnhelper.c index f05e5e1fc7..7075f7c0f2 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -787,7 +787,7 @@ cref_replace_with_duplicated_cref_each_frame(const VALUE *vptr, int can_be_svar, return (rb_cref_t *)new_cref; case imemo_svar: if (can_be_svar) { - return cref_replace_with_duplicated_cref_each_frame((const VALUE *)&((struct vm_svar *)v)->cref_or_me, FALSE, v); + return cref_replace_with_duplicated_cref_each_frame(&((struct vm_svar *)v)->cref_or_me, FALSE, v); } /* fall through */ case imemo_ment: @@ -877,7 +877,7 @@ rb_vm_rewrite_cref(rb_cref_t *cref, VALUE old_klass, VALUE new_klass, rb_cref_t new_cref = vm_cref_new_use_prev(CREF_CLASS(cref), METHOD_VISI_UNDEF, FALSE, cref, FALSE); cref = CREF_NEXT(cref); *new_cref_ptr = new_cref; - new_cref_ptr = (rb_cref_t **)&new_cref->next; + new_cref_ptr = &new_cref->next; } *new_cref_ptr = NULL; }