[前][次][番号順一覧][スレッド一覧]

ruby-changes:68690

From: Maxime <ko1@a...>
Date: Thu, 21 Oct 2021 08:12:25 +0900 (JST)
Subject: [ruby-changes:68690] 5b6a963b71 (master): Fix compiler warnings

https://git.ruby-lang.org/ruby.git/commit/?id=5b6a963b71

From 5b6a963b710db6bacb64d17c32666f3db935b0ac Mon Sep 17 00:00:00 2001
From: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@s...>
Date: Fri, 23 Oct 2020 16:49:59 -0400
Subject: Fix compiler warnings

---
 ujit_compile.c | 7 +++----
 ujit_utils.c   | 2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/ujit_compile.c b/ujit_compile.c
index 678f84c977..e97e79d038 100644
--- a/ujit_compile.c
+++ b/ujit_compile.c
@@ -493,9 +493,6 @@ gen_opt_send_without_block(codeblock_t* cb, codeblock_t* ocb, ctx_t* ctx) https://github.com/ruby/ruby/blob/trunk/ujit_compile.c#L493
     struct rb_call_data * cd = (struct rb_call_data *)ctx_get_arg(ctx, 0);
     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
     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) https://github.com/ruby/ruby/blob/trunk/ujit_compile.c#L541
     x86opnd_t recv = ctx_stack_opnd(ctx, argc);
     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);
     //print_str(cb, "");
     //print_str(cb, "calling CFUNC:");
@@ -668,7 +667,7 @@ gen_opt_send_without_block(codeblock_t* cb, codeblock_t* ocb, ctx_t* ctx) https://github.com/ruby/ruby/blob/trunk/ujit_compile.c#L667
 
     // Call the C function
     // 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");
 
diff --git a/ujit_utils.c b/ujit_utils.c
index b7d121c9ef..a82bf6c638 100644
--- a/ujit_utils.c
+++ b/ujit_utils.c
@@ -36,7 +36,7 @@ void pop_regs(codeblock_t* cb) https://github.com/ruby/ruby/blob/trunk/ujit_utils.c#L36
 
 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)
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]