mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
vm_trace.c: warning
* vm_trace.c (exec_hooks): supress clobbered warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d7ca01a73a
commit
d90b023603
1 changed files with 3 additions and 5 deletions
|
@ -280,7 +280,6 @@ clean_hooks(rb_hook_list_t *list)
|
||||||
static int
|
static int
|
||||||
exec_hooks(rb_thread_t *th, rb_hook_list_t *list, const rb_trace_arg_t *trace_arg)
|
exec_hooks(rb_thread_t *th, rb_hook_list_t *list, const rb_trace_arg_t *trace_arg)
|
||||||
{
|
{
|
||||||
rb_event_hook_t *hook;
|
|
||||||
int state;
|
int state;
|
||||||
volatile int raised;
|
volatile int raised;
|
||||||
|
|
||||||
|
@ -290,13 +289,13 @@ exec_hooks(rb_thread_t *th, rb_hook_list_t *list, const rb_trace_arg_t *trace_ar
|
||||||
|
|
||||||
raised = rb_threadptr_reset_raised(th);
|
raised = rb_threadptr_reset_raised(th);
|
||||||
|
|
||||||
hook = list->hooks;
|
|
||||||
|
|
||||||
/* TODO: Support !RUBY_HOOK_FLAG_SAFE hooks */
|
/* TODO: Support !RUBY_HOOK_FLAG_SAFE hooks */
|
||||||
|
|
||||||
TH_PUSH_TAG(th);
|
TH_PUSH_TAG(th);
|
||||||
if ((state = TH_EXEC_TAG()) == 0) {
|
if ((state = TH_EXEC_TAG()) == 0) {
|
||||||
while (hook) {
|
rb_event_hook_t *hook;
|
||||||
|
|
||||||
|
for (hook = list->hooks; hook; hook = hook->next) {
|
||||||
if (LIKELY(!(hook->hook_flags & RUBY_HOOK_FLAG_DELETED)) && (trace_arg->event & hook->events)) {
|
if (LIKELY(!(hook->hook_flags & RUBY_HOOK_FLAG_DELETED)) && (trace_arg->event & hook->events)) {
|
||||||
if (!(hook->hook_flags & RUBY_HOOK_FLAG_RAW_ARG)) {
|
if (!(hook->hook_flags & RUBY_HOOK_FLAG_RAW_ARG)) {
|
||||||
(*hook->func)(trace_arg->event, hook->data, trace_arg->self, trace_arg->id, trace_arg->klass);
|
(*hook->func)(trace_arg->event, hook->data, trace_arg->self, trace_arg->id, trace_arg->klass);
|
||||||
|
@ -305,7 +304,6 @@ exec_hooks(rb_thread_t *th, rb_hook_list_t *list, const rb_trace_arg_t *trace_ar
|
||||||
(*((rb_event_hook_raw_arg_func_t)hook->func))(hook->data, trace_arg);
|
(*((rb_event_hook_raw_arg_func_t)hook->func))(hook->data, trace_arg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
hook = hook->next;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TH_POP_TAG();
|
TH_POP_TAG();
|
||||||
|
|
Loading…
Add table
Reference in a new issue