зеркало из https://github.com/github/ruby.git
remove unnecessary volatiles
* ext/dbm/dbm.c (fdbm_initialize): used for rb_sys_fail_str. * ext/sdbm/init.c (fsdbm_initialize): ditto. * ext/tk/tcltklib.c (lib_do_one_event_core): no effect. * ext/tk/tkutil/tkutil.c (tk_eval_cmd, tk_get_eval_string): no effect if tail call optimized. * ext/tk/tkutil/tkutil.c (cbsubst_table_setup): set to const. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
19f143221c
Коммит
c285a4e357
|
@ -145,8 +145,7 @@ fdbm_alloc(VALUE klass)
|
|||
static VALUE
|
||||
fdbm_initialize(int argc, VALUE *argv, VALUE obj)
|
||||
{
|
||||
volatile VALUE file;
|
||||
VALUE vmode, vflags;
|
||||
VALUE file, vmode, vflags;
|
||||
DBM *dbm;
|
||||
struct dbmdata *dbmp;
|
||||
int mode, flags = 0;
|
||||
|
|
|
@ -179,8 +179,7 @@ fsdbm_alloc(VALUE klass)
|
|||
static VALUE
|
||||
fsdbm_initialize(int argc, VALUE *argv, VALUE obj)
|
||||
{
|
||||
volatile VALUE file;
|
||||
VALUE vmode;
|
||||
VALUE file, vmode;
|
||||
DBM *dbm;
|
||||
struct dbmdata *dbmp;
|
||||
int mode;
|
||||
|
|
|
@ -3035,7 +3035,7 @@ lib_do_one_event_core(argc, argv, self, is_ip)
|
|||
VALUE self;
|
||||
int is_ip;
|
||||
{
|
||||
volatile VALUE vflags;
|
||||
VALUE vflags;
|
||||
int flags;
|
||||
int found_event;
|
||||
|
||||
|
|
|
@ -187,7 +187,7 @@ tk_eval_cmd(argc, argv, self)
|
|||
VALUE argv[];
|
||||
VALUE self;
|
||||
{
|
||||
volatile VALUE cmd, rest;
|
||||
VALUE cmd, rest;
|
||||
|
||||
rb_scan_args(argc, argv, "1*", &cmd, &rest);
|
||||
return rb_eval_cmd(cmd, rest, 0);
|
||||
|
@ -952,7 +952,7 @@ tk_get_eval_string(argc, argv, self)
|
|||
VALUE *argv;
|
||||
VALUE self;
|
||||
{
|
||||
volatile VALUE obj, enc_flag;
|
||||
VALUE obj, enc_flag;
|
||||
|
||||
if (rb_scan_args(argc, argv, "11", &obj, &enc_flag) == 1) {
|
||||
enc_flag = Qnil;
|
||||
|
@ -1563,7 +1563,7 @@ cbsubst_table_setup(argc, argv, self)
|
|||
VALUE *argv;
|
||||
VALUE self;
|
||||
{
|
||||
volatile VALUE cbsubst_obj;
|
||||
VALUE cbsubst_obj;
|
||||
VALUE key_inf;
|
||||
VALUE longkey_inf;
|
||||
VALUE proc_inf;
|
||||
|
|
Загрузка…
Ссылка в новой задаче