summaryrefslogtreecommitdiff
path: root/yjit_codegen.c
diff options
context:
space:
mode:
authorAlan Wu <[email protected]>2021-03-31 18:27:34 -0400
committerAlan Wu <[email protected]>2021-10-20 18:19:32 -0400
commitd03b7f77d45105bfe613b986bfddaaa6c1de6831 (patch)
tree813dfa739f9c9ff573268bc887dfd6e24afd605a /yjit_codegen.c
parent9911f486a7d9902a900f91cfa607e8cacdda6494 (diff)
Fix GCC warnings
Mostly unused and uninitialized warnings here and there
Diffstat (limited to 'yjit_codegen.c')
-rw-r--r--yjit_codegen.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/yjit_codegen.c b/yjit_codegen.c
index 1a19c84101..6ccc6afc99 100644
--- a/yjit_codegen.c
+++ b/yjit_codegen.c
@@ -36,7 +36,7 @@ jit_print_loc(jitstate_t* jit, const char* msg)
long len;
VALUE path = rb_iseq_path(jit->iseq);
RSTRING_GETMEM(path, ptr, len);
- fprintf(stderr, "%s %s:%u\n", msg, ptr, rb_iseq_line_no(jit->iseq, jit->insn_idx));
+ fprintf(stderr, "%s %.*s:%u\n", msg, (int)len, ptr, rb_iseq_line_no(jit->iseq, jit->insn_idx));
}
// Get the current instruction's opcode
@@ -1825,6 +1825,8 @@ gen_opt_send_without_block(jitstate_t* jit, ctx_t* ctx)
return YJIT_CANT_COMPILE;
// no default case so compiler issues a warning if this is not exhaustive
}
+
+ return YJIT_CANT_COMPILE;
}
static codegen_status_t