Suppress a format-overflow warning
This commit is contained in:
parent
2939c57ca7
commit
abb672e14f
@ -937,8 +937,11 @@ compile_compact_jit_code(char* c_file)
|
|||||||
if (FIXNUM_P(child_unit->iseq->body->location.first_lineno))
|
if (FIXNUM_P(child_unit->iseq->body->location.first_lineno))
|
||||||
// FIX2INT may fallback to rb_num2long(), which is a method call and dangerous in MJIT worker. So using only FIX2LONG.
|
// FIX2INT may fallback to rb_num2long(), which is a method call and dangerous in MJIT worker. So using only FIX2LONG.
|
||||||
iseq_lineno = FIX2LONG(child_unit->iseq->body->location.first_lineno);
|
iseq_lineno = FIX2LONG(child_unit->iseq->body->location.first_lineno);
|
||||||
fprintf(f, "\n/* %s@%s:%ld */\n", RSTRING_PTR(child_unit->iseq->body->location.label),
|
const char *sep = "@";
|
||||||
RSTRING_PTR(rb_iseq_path(child_unit->iseq)), iseq_lineno);
|
const char *iseq_label = RSTRING_PTR(child_unit->iseq->body->location.label);
|
||||||
|
const char *iseq_path = RSTRING_PTR(rb_iseq_path(child_unit->iseq));
|
||||||
|
if (!iseq_label) iseq_label = sep = "";
|
||||||
|
fprintf(f, "\n/* %s%s%s:%ld */\n", iseq_label, sep, iseq_path, iseq_lineno);
|
||||||
success &= mjit_compile(f, child_unit->iseq, funcname, child_unit->id);
|
success &= mjit_compile(f, child_unit->iseq, funcname, child_unit->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user