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

ruby-changes:66422

From: Nobuyoshi <ko1@a...>
Date: Thu, 3 Jun 2021 20:07:52 +0900 (JST)
Subject: [ruby-changes:66422] 93be7a4c6b (master): Suppress clobbered warnings on Travis-CI ppc64le-linux

https://git.ruby-lang.org/ruby.git/commit/?id=93be7a4c6b

From 93be7a4c6bda8269b3d82ce4cfde6b2bde3b9718 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 3 Jun 2021 20:07:26 +0900
Subject: Suppress clobbered warnings on Travis-CI ppc64le-linux

---
 cont.c   | 2 +-
 thread.c | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/cont.c b/cont.c
index bf540a1..cb52fe8 100644
--- a/cont.c
+++ b/cont.c
@@ -2041,7 +2041,6 @@ rb_fiber_start(void) https://github.com/ruby/ruby/blob/trunk/cont.c#L2041
     rb_proc_t *proc;
     enum ruby_tag_type state;
     int need_interrupt = TRUE;
-    VALUE err = Qfalse;
 
     VM_ASSERT(th->ec == GET_EC());
     VM_ASSERT(FIBER_RESUMED_P(fiber));
@@ -2067,6 +2066,7 @@ rb_fiber_start(void) https://github.com/ruby/ruby/blob/trunk/cont.c#L2066
     }
     EC_POP_TAG();
 
+    VALUE err = Qfalse;
     if (state) {
         err = th->ec->errinfo;
         VM_ASSERT(FIBER_RESUMED_P(fiber));
diff --git a/thread.c b/thread.c
index 419bf09..cbef44a 100644
--- a/thread.c
+++ b/thread.c
@@ -4408,13 +4408,13 @@ int https://github.com/ruby/ruby/blob/trunk/thread.c#L4408
 rb_thread_wait_for_single_fd(int fd, int events, struct timeval *timeout)
 {
     struct pollfd fds[2];
-    int result = 0, lerrno;
-    rb_hrtime_t *to, rel, end = 0;
+    int result = 0;
     int drained;
     nfds_t nfds;
     rb_unblock_function_t *ubf;
     struct waiting_fd wfd;
     int state;
+    volatile int lerrno;
 
     wfd.th = GET_THREAD();
     wfd.fd = fd;
@@ -4427,6 +4427,7 @@ rb_thread_wait_for_single_fd(int fd, int events, struct timeval *timeout) https://github.com/ruby/ruby/blob/trunk/thread.c#L4427
 
     EC_PUSH_TAG(wfd.th->ec);
     if ((state = EC_EXEC_TAG()) == TAG_NONE) {
+        rb_hrtime_t *to, rel, end = 0;
         RUBY_VM_CHECK_INTS_BLOCKING(wfd.th->ec);
         timeout_prepare(&to, &rel, &end, timeout);
         fds[0].fd = fd;
-- 
cgit v1.1


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

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