Skip to content

Commit 543e3a1

Browse files
committed
Cast up int instruction code to VALUE
Fix Visual C warnings: ``` iseq.c(3793): warning C4312: 'type cast': conversion from 'int' to 'void *' of greater size iseq.c(3794): warning C4312: 'type cast': conversion from 'int' to 'void *' of greater size ```
1 parent f1f0cc1 commit 543e3a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

iseq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3778,7 +3778,7 @@ rb_vm_encoded_insn_data_table_init(void)
37783778
const void * const *table = rb_vm_get_insns_address_table();
37793779
#define INSN_CODE(insn) ((VALUE)table[insn])
37803780
#else
3781-
#define INSN_CODE(insn) (insn)
3781+
#define INSN_CODE(insn) ((VALUE)(insn))
37823782
#endif
37833783
encoded_insn_data = st_init_numtable_with_size(VM_BARE_INSTRUCTION_SIZE);
37843784

0 commit comments

Comments
 (0)