* 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] (patch from Kazuhiro NISHIYAMA) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4029f29dd7
commit
08133b1344
@ -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>
|
Tue Jun 28 01:52:00 2005 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* ext/nkf/lib/kconv.rb: add Kconv::VERSION
|
* ext/nkf/lib/kconv.rb: add Kconv::VERSION
|
||||||
|
1
bignum.c
1
bignum.c
@ -1057,7 +1057,6 @@ rb_big_neg(x)
|
|||||||
VALUE z = rb_big_clone(x);
|
VALUE z = rb_big_clone(x);
|
||||||
long i = RBIGNUM(x)->len;
|
long i = RBIGNUM(x)->len;
|
||||||
BDIGIT *ds = BDIGITS(z);
|
BDIGIT *ds = BDIGITS(z);
|
||||||
int nz = 0;
|
|
||||||
|
|
||||||
if (!RBIGNUM(x)->sign) get2comp(z, Qtrue);
|
if (!RBIGNUM(x)->sign) get2comp(z, Qtrue);
|
||||||
while (i--) {
|
while (i--) {
|
||||||
|
6
dir.c
6
dir.c
@ -1220,6 +1220,8 @@ glob_helper(path, dirsep, exist, isdir, beg, end, flags, func, arg)
|
|||||||
case MATCH_DIR:
|
case MATCH_DIR:
|
||||||
match_dir = 1;
|
match_dir = 1;
|
||||||
break;
|
break;
|
||||||
|
case RECURSIVE:
|
||||||
|
rb_bug("continuous RECURSIVEs");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1234,7 +1236,6 @@ glob_helper(path, dirsep, exist, isdir, beg, end, flags, func, arg)
|
|||||||
isdir = NO;
|
isdir = NO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (match_dir && isdir == UNKNOWN) {
|
if (match_dir && isdir == UNKNOWN) {
|
||||||
if (do_stat(path, &st) == 0) {
|
if (do_stat(path, &st) == 0) {
|
||||||
exist = YES;
|
exist = YES;
|
||||||
@ -1245,12 +1246,10 @@ glob_helper(path, dirsep, exist, isdir, beg, end, flags, func, arg)
|
|||||||
isdir = NO;
|
isdir = NO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (match_all && exist == YES) {
|
if (match_all && exist == YES) {
|
||||||
status = glob_call_func(func, path, arg);
|
status = glob_call_func(func, path, arg);
|
||||||
if (status) return status;
|
if (status) return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (match_dir && isdir == YES) {
|
if (match_dir && isdir == YES) {
|
||||||
char *tmp = join_path(path, dirsep, "");
|
char *tmp = join_path(path, dirsep, "");
|
||||||
status = glob_call_func(func, tmp, arg);
|
status = glob_call_func(func, tmp, arg);
|
||||||
@ -1612,7 +1611,6 @@ static VALUE
|
|||||||
dir_open_dir(path)
|
dir_open_dir(path)
|
||||||
VALUE path;
|
VALUE path;
|
||||||
{
|
{
|
||||||
struct dir_data *dp;
|
|
||||||
VALUE dir = rb_funcall(rb_cDir, rb_intern("open"), 1, path);
|
VALUE dir = rb_funcall(rb_cDir, rb_intern("open"), 1, path);
|
||||||
|
|
||||||
if (TYPE(dir) != T_DATA ||
|
if (TYPE(dir) != T_DATA ||
|
||||||
|
15
eval.c
15
eval.c
@ -1569,8 +1569,6 @@ ruby_cleanup(ex)
|
|||||||
|
|
||||||
extern NODE *ruby_eval_tree;
|
extern NODE *ruby_eval_tree;
|
||||||
|
|
||||||
static void cont_call _((VALUE));
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ruby_exec_internal()
|
ruby_exec_internal()
|
||||||
{
|
{
|
||||||
@ -1583,11 +1581,6 @@ ruby_exec_internal()
|
|||||||
if ((state = EXEC_TAG()) == 0) {
|
if ((state = EXEC_TAG()) == 0) {
|
||||||
eval_node(ruby_top_self, ruby_eval_tree);
|
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) {
|
else if (state == TAG_THREAD) {
|
||||||
rb_thread_start_1();
|
rb_thread_start_1();
|
||||||
}
|
}
|
||||||
@ -6092,7 +6085,7 @@ rb_call_super(argc, argv)
|
|||||||
int argc;
|
int argc;
|
||||||
const VALUE *argv;
|
const VALUE *argv;
|
||||||
{
|
{
|
||||||
VALUE result, self, klass, k;
|
VALUE result, self, klass;
|
||||||
|
|
||||||
if (ruby_frame->this_class == 0) {
|
if (ruby_frame->this_class == 0) {
|
||||||
rb_name_error(ruby_frame->callee, "calling `super' from `%s' is prohibited",
|
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 proc;
|
||||||
{
|
{
|
||||||
VALUE b;
|
VALUE b;
|
||||||
struct BLOCK * volatile old_block;
|
|
||||||
struct BLOCK _block;
|
struct BLOCK _block;
|
||||||
struct BLOCK *data;
|
struct BLOCK *data;
|
||||||
volatile VALUE result = Qnil;
|
volatile VALUE result = Qnil;
|
||||||
@ -11041,7 +11033,9 @@ rb_thread_select(max, read, write, except, timeout)
|
|||||||
fd_set *read, *write, *except;
|
fd_set *read, *write, *except;
|
||||||
struct timeval *timeout;
|
struct timeval *timeout;
|
||||||
{
|
{
|
||||||
|
#ifndef linux
|
||||||
double limit;
|
double limit;
|
||||||
|
#endif
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
if (!read && !write && !except) {
|
if (!read && !write && !except) {
|
||||||
@ -11053,10 +11047,12 @@ rb_thread_select(max, read, write, except, timeout)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef linux
|
||||||
if (timeout) {
|
if (timeout) {
|
||||||
limit = timeofday()+
|
limit = timeofday()+
|
||||||
(double)timeout->tv_sec+(double)timeout->tv_usec*1e-6;
|
(double)timeout->tv_sec+(double)timeout->tv_usec*1e-6;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (rb_thread_critical ||
|
if (rb_thread_critical ||
|
||||||
curr_thread == curr_thread->next ||
|
curr_thread == curr_thread->next ||
|
||||||
@ -13099,7 +13095,6 @@ thgroup_add(group, thread)
|
|||||||
|
|
||||||
/* variables for recursive traversals */
|
/* variables for recursive traversals */
|
||||||
static ID recursive_key;
|
static ID recursive_key;
|
||||||
static VALUE recursive_tbl;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
2
parse.y
2
parse.y
@ -48,8 +48,6 @@
|
|||||||
((id)&ID_SCOPE_MASK) == ID_INSTANCE || \
|
((id)&ID_SCOPE_MASK) == ID_INSTANCE || \
|
||||||
((id)&ID_SCOPE_MASK) == ID_CLASS))
|
((id)&ID_SCOPE_MASK) == ID_CLASS))
|
||||||
|
|
||||||
static int is_valid_lvar _((ID id));
|
|
||||||
|
|
||||||
#ifndef RIPPER
|
#ifndef RIPPER
|
||||||
char *ruby_sourcefile; /* current source file */
|
char *ruby_sourcefile; /* current source file */
|
||||||
int ruby_sourceline; /* current line no. */
|
int ruby_sourceline; /* current line no. */
|
||||||
|
12
process.c
12
process.c
@ -1046,8 +1046,8 @@ rb_proc_exec(str)
|
|||||||
if (nl) s = nl;
|
if (nl) s = nl;
|
||||||
}
|
}
|
||||||
if (*s != ' ' && !ISALPHA(*s) && strchr("*?{}[]<>()~&|\\$;'`\"\n",*s)) {
|
if (*s != ' ' && !ISALPHA(*s) && strchr("*?{}[]<>()~&|\\$;'`\"\n",*s)) {
|
||||||
int status;
|
|
||||||
#if defined(MSDOS)
|
#if defined(MSDOS)
|
||||||
|
int status;
|
||||||
before_exec();
|
before_exec();
|
||||||
status = system(str);
|
status = system(str);
|
||||||
after_exec();
|
after_exec();
|
||||||
@ -1055,7 +1055,7 @@ rb_proc_exec(str)
|
|||||||
exit(status);
|
exit(status);
|
||||||
#elif defined(__human68k__) || defined(__CYGWIN32__) || defined(__EMX__)
|
#elif defined(__human68k__) || defined(__CYGWIN32__) || defined(__EMX__)
|
||||||
char *shell = dln_find_exe("sh", 0);
|
char *shell = dln_find_exe("sh", 0);
|
||||||
status = -1;
|
int status = -1;
|
||||||
before_exec();
|
before_exec();
|
||||||
if (shell)
|
if (shell)
|
||||||
execl(shell, "sh", "-c", str, (char *) NULL);
|
execl(shell, "sh", "-c", str, (char *) NULL);
|
||||||
@ -1532,7 +1532,13 @@ rb_syswait(pid)
|
|||||||
int pid;
|
int pid;
|
||||||
{
|
{
|
||||||
static int overriding;
|
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 status;
|
||||||
int i, hooked = Qfalse;
|
int i, hooked = Qfalse;
|
||||||
|
|
||||||
|
2
ruby.c
2
ruby.c
@ -1045,7 +1045,9 @@ set_arg0(val, id)
|
|||||||
{
|
{
|
||||||
char *s;
|
char *s;
|
||||||
long i;
|
long i;
|
||||||
|
#if !defined(PSTAT_SETCMD) && !defined(HAVE_SETPROCTITLE)
|
||||||
static int len;
|
static int len;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (origargv == 0) rb_raise(rb_eRuntimeError, "$0 not initialized");
|
if (origargv == 0) rb_raise(rb_eRuntimeError, "$0 not initialized");
|
||||||
StringValue(val);
|
StringValue(val);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user