aboutsummaryrefslogtreecommitdiffstats
path: root/mjit.h
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2021-03-31 18:27:34 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:32 -0400
commitd03b7f77d45105bfe613b986bfddaaa6c1de6831 (patch)
tree813dfa739f9c9ff573268bc887dfd6e24afd605a /mjit.h
parent9911f486a7d9902a900f91cfa607e8cacdda6494 (diff)
downloadruby-d03b7f77d45105bfe613b986bfddaaa6c1de6831.tar.gz
Fix GCC warnings
Mostly unused and uninitialized warnings here and there
Diffstat (limited to 'mjit.h')
-rw-r--r--mjit.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/mjit.h b/mjit.h
index 3b28f51d1d..e6bf6be8dc 100644
--- a/mjit.h
+++ b/mjit.h
@@ -141,12 +141,10 @@ mjit_exec_slowpath(rb_execution_context_t *ec, const rb_iseq_t *iseq, struct rb_
static inline VALUE
mjit_exec(rb_execution_context_t *ec)
{
- const rb_iseq_t *iseq;
- struct rb_iseq_constant_body *body;
+ const rb_iseq_t *iseq = ec->cfp->iseq;
+ struct rb_iseq_constant_body *body = iseq->body;
if (mjit_call_p || rb_yjit_enabled_p()) {
- iseq = ec->cfp->iseq;
- body = iseq->body;
body->total_calls++;
}