ZJIT: Fix -Wpedantic warning in C99 mode when built with YJIT

> insns.def:857:5: error: assigning to 'rb_zjit_func_t' (aka 'unsigned
> long (*)(struct rb_execution_context_struct *, struct
> rb_control_frame_struct *, unsigned long (*)(struct
> rb_execution_context_struct *, struct rb_control_frame_struct *))') from
> 'void *' converts between void pointer and function pointer
> [-Werror,-Wpedantic]
This commit is contained in:
Alan Wu 2025-12-02 22:11:20 -05:00
parent ee7923288f
commit 3269ae1b0d
Notes: git 2025-12-05 20:50:34 +00:00

View File

@ -185,7 +185,7 @@ default: \
if (ec->tag->state) THROW_EXCEPTION(val); \ if (ec->tag->state) THROW_EXCEPTION(val); \
} \ } \
} \ } \
else if ((zjit_entry = rb_zjit_entry)) { \ else if ((zjit_entry = (rb_zjit_func_t)rb_zjit_entry)) { \
rb_jit_func_t func = zjit_compile(ec); \ rb_jit_func_t func = zjit_compile(ec); \
if (func) { \ if (func) { \
val = zjit_entry(ec, ec->cfp, func); \ val = zjit_entry(ec, ec->cfp, func); \