Fix compiler warnings

This commit is contained in:
Maxime Chevalier-Boisvert 2020-10-23 16:49:59 -04:00 committed by Alan Wu
parent b761f5c96f
commit 5b6a963b71
2 changed files with 4 additions and 5 deletions

View file

@ -493,9 +493,6 @@ gen_opt_send_without_block(codeblock_t* cb, codeblock_t* ocb, ctx_t* ctx)
struct rb_call_data * cd = (struct rb_call_data *)ctx_get_arg(ctx, 0); struct rb_call_data * cd = (struct rb_call_data *)ctx_get_arg(ctx, 0);
int32_t argc = (int32_t)vm_ci_argc(cd->ci); int32_t argc = (int32_t)vm_ci_argc(cd->ci);
// Callee method ID
ID mid = vm_ci_mid(cd->ci);
// Don't JIT calls with keyword splat // Don't JIT calls with keyword splat
if (vm_ci_flag(cd->ci) & VM_CALL_KW_SPLAT) if (vm_ci_flag(cd->ci) & VM_CALL_KW_SPLAT)
{ {
@ -544,6 +541,8 @@ gen_opt_send_without_block(codeblock_t* cb, codeblock_t* ocb, ctx_t* ctx)
x86opnd_t recv = ctx_stack_opnd(ctx, argc); x86opnd_t recv = ctx_stack_opnd(ctx, argc);
mov(cb, REG0, recv); mov(cb, REG0, recv);
// Callee method ID
//ID mid = vm_ci_mid(cd->ci);
//printf("JITting call to C function \"%s\", argc: %lu\n", rb_id2name(mid), argc); //printf("JITting call to C function \"%s\", argc: %lu\n", rb_id2name(mid), argc);
//print_str(cb, ""); //print_str(cb, "");
//print_str(cb, "calling CFUNC:"); //print_str(cb, "calling CFUNC:");
@ -668,7 +667,7 @@ gen_opt_send_without_block(codeblock_t* cb, codeblock_t* ocb, ctx_t* ctx)
// Call the C function // Call the C function
// VALUE ret = (cfunc->func)(recv, argv[0], argv[1]); // VALUE ret = (cfunc->func)(recv, argv[0], argv[1]);
call_ptr(cb, REG0, cfunc->func); call_ptr(cb, REG0, (void*)cfunc->func);
//print_str(cb, "after C call"); //print_str(cb, "after C call");

View file

@ -36,7 +36,7 @@ void pop_regs(codeblock_t* cb)
static void print_int_cfun(int64_t val) static void print_int_cfun(int64_t val)
{ {
printf("%lld\n", val); printf("%lld\n", (long long int)val);
} }
void print_int(codeblock_t* cb, x86opnd_t opnd) void print_int(codeblock_t* cb, x86opnd_t opnd)