diff --git a/cont.c b/cont.c index 11428564be..9ab5a8fefe 100644 --- a/cont.c +++ b/cont.c @@ -495,10 +495,10 @@ static void fiber_set_stack_location(void) { rb_thread_t *th = GET_THREAD(); - VALUE ptr; + VALUE *ptr; SET_MACHINE_STACK_END(&ptr); - th->machine_stack_start = (void*)((ptr & PAGE_MASK) + STACK_UPPER(&ptr, 0, PAGE_SIZE)); + th->machine_stack_start = (void*)(((VALUE)ptr & PAGE_MASK) + STACK_UPPER(&ptr, 0, PAGE_SIZE)); } static VOID CALLBACK diff --git a/iseq.c b/iseq.c index 51891b2ce1..48d0cdfcb9 100644 --- a/iseq.c +++ b/iseq.c @@ -229,7 +229,7 @@ prepare_iseq_build(rb_iseq_t *iseq, iseq->name = name; iseq->filename = filename; iseq->filepath = filepath == Qnil ? Qnil : rb_realpath_internal(Qnil, filepath, 1); - iseq->line_no = line_no; + iseq->line_no = (unsigned short)line_no; /* TODO: really enough? */ iseq->defined_method_id = 0; iseq->mark_ary = rb_ary_tmp_new(3); OBJ_UNTRUST(iseq->mark_ary); diff --git a/node.c b/node.c index e7d3c4cd34..65bc541ed8 100644 --- a/node.c +++ b/node.c @@ -501,7 +501,7 @@ dump_node(VALUE buf, VALUE indent, int comment, NODE *node) F_CUSTOM1(nd_nth, "variable", { char name[3]; name[0] = '$'; - name[1] = node->nd_nth; + name[1] = (char)node->nd_nth; name[2] = '\0'; A(name); });