diff --git a/ChangeLog b/ChangeLog index 9faa919112..742b5a7fb5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,25 @@ +Thu Mar 8 09:17:59 2007 Minero Aoki + + * compile.c: iseq_compile -> rb_iseq_compile. + + * iseq.c: ditto. + + * intern.h: provide function prototype of Init_jump. + + * eval_jump.h (Init_jump): declare function type. + + * thread.c: platform-dependent functions should be surrounded by #ifdef. + + * iseq.c (iseq_data_to_ary): remove unused variable. + + * compile.c (set_arguments): ditto. + + * thread.c (set_unblock_function): ditto. + + * thread_pthread.ci: reduce printf warning. + + * vm_dump.c: ditto. + Tue Mar 6 16:35:04 2007 Keiju Ishitsuka * lib/shell/process-controller.rb: fix thread synchronization problem for [ruby-dev:30477]. diff --git a/compile.c b/compile.c index d75d8242ac..8ccdb33d21 100644 --- a/compile.c +++ b/compile.c @@ -138,7 +138,7 @@ iseq_add_mark_object_compile_time(rb_iseq_t *iseq, VALUE v) #endif VALUE -iseq_compile(VALUE self, NODE *narg) +rb_iseq_compile(VALUE self, NODE *narg) { DECL_ANCHOR(list_anchor); rb_iseq_t *iseq; @@ -1097,7 +1097,6 @@ static int set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *optargs, NODE *node_arg) { NODE *node_aux = node_arg->nd_next; - int mandatory_len = 0; NODE *node_opt = 0; ID rest_id = 0; ID block_id = 0; diff --git a/eval_jump.h b/eval_jump.h index a48a5357fd..aa2d84a3fe 100644 --- a/eval_jump.h +++ b/eval_jump.h @@ -402,7 +402,7 @@ rb_exec_end_proc(void) } void -Init_jump() +Init_jump(void) { rb_define_global_function("catch", rb_f_catch, 1); rb_define_global_function("throw", rb_f_throw, -1); diff --git a/intern.h b/intern.h index 876084990b..0d9fa12476 100644 --- a/intern.h +++ b/intern.h @@ -255,6 +255,7 @@ VALUE rb_protect(VALUE (*)(VALUE), VALUE, int*); void rb_set_end_proc(void (*)(VALUE), VALUE); void rb_mark_end_proc(void); void rb_exec_end_proc(void); +void Init_jump(void); void ruby_finalize(void); NORETURN(void ruby_stop(int)); int ruby_cleanup(int); diff --git a/iseq.c b/iseq.c index 106c4dae8f..06ca48f613 100644 --- a/iseq.c +++ b/iseq.c @@ -272,7 +272,7 @@ rb_iseq_new_with_bopt_and_opt(NODE *node, VALUE name, VALUE filename, iseq->self = self; prepare_iseq_build(iseq, name, filename, parent, type, bopt, option); - iseq_compile(self, node); + rb_iseq_compile(self, node); cleanup_iseq_build(iseq); return self; } @@ -1076,7 +1076,7 @@ cdhash_each(VALUE key, VALUE value, VALUE ary) VALUE iseq_data_to_ary(rb_iseq_t *iseq) { - int i, pos, opt = 0; + int i, pos; VALUE *seq; VALUE val = rb_ary_new(); diff --git a/thread.c b/thread.c index 9ef165673f..ab1863f1b1 100644 --- a/thread.c +++ b/thread.c @@ -191,7 +191,6 @@ static rb_unblock_function_t * set_unblock_function(rb_thread_t *th, rb_unblock_function_t *func) { rb_unblock_function_t *oldfunc; - int interrupted; check_ints: RUBY_VM_CHECK_INTS(); /* check signal or so */ @@ -1652,6 +1651,7 @@ rb_fd_copy(rb_fdset_t *dst, const fd_set *src, int max) #endif +#if defined(__CYGWIN__) || defined(_WIN32) static long cmp_tv(const struct timeval *a, const struct timeval *b) { @@ -1673,6 +1673,7 @@ subst(struct timeval *rest, const struct timeval *wait) rest->tv_usec -= wait->tv_usec; return 1; } +#endif static int do_select(int n, fd_set *read, fd_set *write, fd_set *except, diff --git a/thread_pthread.ci b/thread_pthread.ci index 1b9d1b9c53..595bb8e8fb 100644 --- a/thread_pthread.ci +++ b/thread_pthread.ci @@ -236,7 +236,7 @@ native_thread_create(rb_thread_t *th) CHECK_ERR(pthread_attr_init(&attr)); #ifdef PTHREAD_STACK_MIN - thread_debug("create - stack size: %u\n", stack_size); + thread_debug("create - stack size: %lu\n", (unsigned long)stack_size); CHECK_ERR(pthread_attr_setstacksize(&attr, stack_size)); #endif @@ -353,8 +353,8 @@ native_sleep(rb_thread_t *th, struct timeval *tv) } else { int r; - thread_debug("native_sleep: pthread_cond_timedwait start (%d, %ld)\n", - ts.tv_sec, ts.tv_nsec); + thread_debug("native_sleep: pthread_cond_timedwait start (%ld, %ld)\n", + (unsigned long)ts.tv_sec, ts.tv_nsec); r = pthread_cond_timedwait(&th->native_thread_data.sleep_cond, &th->interrupt_lock, &ts); thread_debug("native_sleep: pthread_cond_timedwait end (%d)\n", r); diff --git a/vm_dump.c b/vm_dump.c index 8bb016bf99..b7583373a6 100644 --- a/vm_dump.c +++ b/vm_dump.c @@ -122,7 +122,7 @@ control_frame_dump(rb_thread_t *th, rb_control_frame_t *cfp) else { fprintf(stderr, "p:%04d ", pc); } - fprintf(stderr, "s:%04ld b:%04d ", cfp->sp - th->stack, bp); + fprintf(stderr, "s:%04d b:%04d ", cfp->sp - th->stack, bp); fprintf(stderr, lfp_in_heap == ' ' ? "l:%06d " : "l:%06p ", lfp % 10000); fprintf(stderr, dfp_in_heap == ' ' ? "d:%06d " : "d:%06p ", dfp % 10000); fprintf(stderr, "%-6s ", magic);