diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | bignum.c | 1 | ||||
-rw-r--r-- | dir.c | 6 | ||||
-rw-r--r-- | eval.c | 15 | ||||
-rw-r--r-- | parse.y | 2 | ||||
-rw-r--r-- | process.c | 12 | ||||
-rw-r--r-- | ruby.c | 2 |
7 files changed, 26 insertions, 20 deletions
@@ -1,3 +1,11 @@ +Tue Jun 28 21:59:29 2005 Kazuhiro NISHIYAMA <zn@mbf.nifty.com> + + * dir.c, eval.c, parse.y, process.c, ruby.c: avoid warning "unused + variable" [ruby-dev:26387] + + * dir.c (glob_helper): avoid warning "enumeration value `RECURSIVE' + not handled in switch" [ruby-dev:26392] + Tue Jun 28 01:52:00 2005 NARUSE, Yui <naruse@ruby-lang.org> * ext/nkf/lib/kconv.rb: add Kconv::VERSION @@ -1057,7 +1057,6 @@ rb_big_neg(x) VALUE z = rb_big_clone(x); long i = RBIGNUM(x)->len; BDIGIT *ds = BDIGITS(z); - int nz = 0; if (!RBIGNUM(x)->sign) get2comp(z, Qtrue); while (i--) { @@ -1220,6 +1220,8 @@ glob_helper(path, dirsep, exist, isdir, beg, end, flags, func, arg) case MATCH_DIR: match_dir = 1; break; + case RECURSIVE: + rb_bug("continuous RECURSIVEs"); } } @@ -1234,7 +1236,6 @@ glob_helper(path, dirsep, exist, isdir, beg, end, flags, func, arg) isdir = NO; } } - if (match_dir && isdir == UNKNOWN) { if (do_stat(path, &st) == 0) { exist = YES; @@ -1245,12 +1246,10 @@ glob_helper(path, dirsep, exist, isdir, beg, end, flags, func, arg) isdir = NO; } } - if (match_all && exist == YES) { status = glob_call_func(func, path, arg); if (status) return status; } - if (match_dir && isdir == YES) { char *tmp = join_path(path, dirsep, ""); status = glob_call_func(func, tmp, arg); @@ -1612,7 +1611,6 @@ static VALUE dir_open_dir(path) VALUE path; { - struct dir_data *dp; VALUE dir = rb_funcall(rb_cDir, rb_intern("open"), 1, path); if (TYPE(dir) != T_DATA || @@ -1569,8 +1569,6 @@ ruby_cleanup(ex) extern NODE *ruby_eval_tree; -static void cont_call _((VALUE)); - static int ruby_exec_internal() { @@ -1583,11 +1581,6 @@ ruby_exec_internal() if ((state = EXEC_TAG()) == 0) { eval_node(ruby_top_self, ruby_eval_tree); } -#if 0 - else if (state == TAG_CONTCALL) { - cont_call(prot_tag->retval); - } -#endif else if (state == TAG_THREAD) { rb_thread_start_1(); } @@ -6092,7 +6085,7 @@ rb_call_super(argc, argv) int argc; const VALUE *argv; { - VALUE result, self, klass, k; + VALUE result, self, klass; if (ruby_frame->this_class == 0) { rb_name_error(ruby_frame->callee, "calling `super' from `%s' is prohibited", @@ -8743,7 +8736,6 @@ rb_block_pass(func, arg, proc) VALUE proc; { VALUE b; - struct BLOCK * volatile old_block; struct BLOCK _block; struct BLOCK *data; volatile VALUE result = Qnil; @@ -11041,7 +11033,9 @@ rb_thread_select(max, read, write, except, timeout) fd_set *read, *write, *except; struct timeval *timeout; { +#ifndef linux double limit; +#endif int n; if (!read && !write && !except) { @@ -11053,10 +11047,12 @@ rb_thread_select(max, read, write, except, timeout) return 0; } +#ifndef linux if (timeout) { limit = timeofday()+ (double)timeout->tv_sec+(double)timeout->tv_usec*1e-6; } +#endif if (rb_thread_critical || curr_thread == curr_thread->next || @@ -13099,7 +13095,6 @@ thgroup_add(group, thread) /* variables for recursive traversals */ static ID recursive_key; -static VALUE recursive_tbl; /* @@ -48,8 +48,6 @@ ((id)&ID_SCOPE_MASK) == ID_INSTANCE || \ ((id)&ID_SCOPE_MASK) == ID_CLASS)) -static int is_valid_lvar _((ID id)); - #ifndef RIPPER char *ruby_sourcefile; /* current source file */ int ruby_sourceline; /* current line no. */ @@ -1046,8 +1046,8 @@ rb_proc_exec(str) if (nl) s = nl; } if (*s != ' ' && !ISALPHA(*s) && strchr("*?{}[]<>()~&|\\$;'`\"\n",*s)) { - int status; #if defined(MSDOS) + int status; before_exec(); status = system(str); after_exec(); @@ -1055,7 +1055,7 @@ rb_proc_exec(str) exit(status); #elif defined(__human68k__) || defined(__CYGWIN32__) || defined(__EMX__) char *shell = dln_find_exe("sh", 0); - status = -1; + int status = -1; before_exec(); if (shell) execl(shell, "sh", "-c", str, (char *) NULL); @@ -1532,7 +1532,13 @@ rb_syswait(pid) int pid; { static int overriding; - RETSIGTYPE (*hfunc)_((int)), (*qfunc)_((int)), (*ifunc)_((int)); +#ifdef SIGHUP + RETSIGTYPE (*hfunc)_((int)); +#endif +#ifdef SIGQUIT + RETSIGTYPE (*qfunc)_((int)); +#endif + RETSIGTYPE (*ifunc)_((int)); int status; int i, hooked = Qfalse; @@ -1045,7 +1045,9 @@ set_arg0(val, id) { char *s; long i; +#if !defined(PSTAT_SETCMD) && !defined(HAVE_SETPROCTITLE) static int len; +#endif if (origargv == 0) rb_raise(rb_eRuntimeError, "$0 not initialized"); StringValue(val); |