Skip to content

Commit b2cd6d7

Browse files
nobuhsbt
authored andcommitted
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 2509297 commit b2cd6d7

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
@@ -3390,7 +3390,7 @@ rb_vm_encoded_insn_data_table_init(void)
33903390
const void * const *table = rb_vm_get_insns_address_table();
33913391
#define INSN_CODE(insn) ((VALUE)table[insn])
33923392
#else
3393-
#define INSN_CODE(insn) (insn)
3393+
#define INSN_CODE(insn) ((VALUE)(insn))
33943394
#endif
33953395
st_data_t insn;
33963396
encoded_insn_data = st_init_numtable_with_size(VM_INSTRUCTION_SIZE / 2);

0 commit comments

Comments
 (0)