mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* dir.c, eval.c, hash.c, process.c, ruby.c: avoid warning "unused
variable" [ruby-dev:26387] (patch from Kazuhiro NISHIYAMA) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d8322d404f
commit
477187defd
6 changed files with 20 additions and 7 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Tue Jun 28 21:59:29 2005 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
|
||||||
|
|
||||||
|
* dir.c, eval.c, hash.c, process.c, ruby.c: avoid warning "unused
|
||||||
|
variable" [ruby-dev:26387]
|
||||||
|
|
||||||
Sat Jun 25 17:15:23 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
Sat Jun 25 17:15:23 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
||||||
|
|
||||||
* lib/webrick/httputils.rb (WEBrick::HTTPUtils.parse_query): should
|
* lib/webrick/httputils.rb (WEBrick::HTTPUtils.parse_query): should
|
||||||
|
|
1
dir.c
1
dir.c
|
@ -1332,7 +1332,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 ||
|
||||||
|
|
9
eval.c
9
eval.c
|
@ -6035,7 +6035,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->last_class == 0) {
|
if (ruby_frame->last_class == 0) {
|
||||||
rb_name_error(ruby_frame->last_func, "calling `super' from `%s' is prohibited",
|
rb_name_error(ruby_frame->last_func, "calling `super' from `%s' is prohibited",
|
||||||
|
@ -10648,7 +10648,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) {
|
||||||
|
@ -10660,10 +10662,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 ||
|
||||||
|
@ -11509,7 +11513,7 @@ rb_thread_start_0(fn, arg, th)
|
||||||
{
|
{
|
||||||
volatile rb_thread_t th_save = th;
|
volatile rb_thread_t th_save = th;
|
||||||
volatile VALUE thread = th->thread;
|
volatile VALUE thread = th->thread;
|
||||||
struct BLOCK *volatile saved_block = 0, *block;
|
struct BLOCK *volatile saved_block = 0;
|
||||||
enum thread_status status;
|
enum thread_status status;
|
||||||
int state;
|
int state;
|
||||||
|
|
||||||
|
@ -12353,7 +12357,6 @@ rb_callcc(self)
|
||||||
volatile rb_thread_t th_save;
|
volatile rb_thread_t th_save;
|
||||||
struct tag *tag;
|
struct tag *tag;
|
||||||
struct RVarmap *vars;
|
struct RVarmap *vars;
|
||||||
struct BLOCK *blk;
|
|
||||||
|
|
||||||
THREAD_ALLOC(th);
|
THREAD_ALLOC(th);
|
||||||
cont = Data_Wrap_Struct(rb_cCont, thread_mark, thread_free, th);
|
cont = Data_Wrap_Struct(rb_cCont, thread_mark, thread_free, th);
|
||||||
|
|
2
hash.c
2
hash.c
|
@ -880,8 +880,6 @@ static VALUE
|
||||||
rb_hash_clear(hash)
|
rb_hash_clear(hash)
|
||||||
VALUE hash;
|
VALUE hash;
|
||||||
{
|
{
|
||||||
void *tmp;
|
|
||||||
|
|
||||||
rb_hash_modify(hash);
|
rb_hash_modify(hash);
|
||||||
if (RHASH(hash)->tbl->num_entries > 0) {
|
if (RHASH(hash)->tbl->num_entries > 0) {
|
||||||
rb_hash_foreach(hash, clear_i, 0);
|
rb_hash_foreach(hash, clear_i, 0);
|
||||||
|
|
|
@ -1351,7 +1351,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
|
@ -1005,7 +1005,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…
Add table
Add a link
Reference in a new issue