From d03b7f77d45105bfe613b986bfddaaa6c1de6831 Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Wed, 31 Mar 2021 18:27:34 -0400 Subject: Fix GCC warnings Mostly unused and uninitialized warnings here and there --- yjit_codegen.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'yjit_codegen.c') 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 -- cgit v1.2.3