aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-23 07:53:07 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-23 07:53:07 +0000
commitd30a1b1e2bf9fb8844b7615b7d33e4036975d7c9 (patch)
tree9bac8aafcbf8e4129d8480a04c90a56e35e48ad2
parent919c7802999ce403bb91c9c47e5e707d1ee6342a (diff)
downloadruby-d30a1b1e2bf9fb8844b7615b7d33e4036975d7c9.tar.gz
thread.c: suppress warning
* thread.c (exec_recursive): rb_catch_protect() uses `int*` as well as rb_protect. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--thread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/thread.c b/thread.c
index 57044f2154..5e0cac5fa8 100644
--- a/thread.c
+++ b/thread.c
@@ -4689,11 +4689,10 @@ exec_recursive(VALUE (*func) (VALUE, VALUE, int), VALUE obj, VALUE pairid, VALUE
return (*func)(obj, arg, TRUE);
}
else {
- enum ruby_tag_type state;
-
p.func = func;
if (outermost) {
+ int state;
recursive_push(p.list, ID2SYM(recursive_key), 0);
recursive_push(p.list, p.objid, p.pairid);
result = rb_catch_protect(p.list, exec_recursive_i, (VALUE)&p, &state);
@@ -4705,6 +4704,7 @@ exec_recursive(VALUE (*func) (VALUE, VALUE, int), VALUE obj, VALUE pairid, VALUE
}
}
else {
+ enum ruby_tag_type state;
volatile VALUE ret = Qundef;
recursive_push(p.list, p.objid, p.pairid);
PUSH_TAG();