summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-06-03 20:07:26 +0900
committerGitHub <noreply@github.com>2021-06-03 20:07:26 +0900
commit93be7a4c6bda8269b3d82ce4cfde6b2bde3b9718 (patch)
tree52a775e732ea17297b48b60d8662d8f7f2d3cf0c /thread.c
parentdc25412042dcb921c27491ef09791d03bc377d98 (diff)
Suppress clobbered warnings on Travis-CI ppc64le-linux
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4550 Merged-By: nobu <nobu@ruby-lang.org>
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/thread.c b/thread.c
index 419bf09151..cbef44a9d4 100644
--- a/thread.c
+++ b/thread.c
@@ -4408,13 +4408,13 @@ int
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)
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;