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

ruby-changes:52456

From: nobu <ko1@a...>
Date: Sun, 9 Sep 2018 21:42:54 +0900 (JST)
Subject: [ruby-changes:52456] nobu:r64665 (trunk): thread.c: get rid of false warnings by gcc-8

nobu	2018-09-09 21:42:48 +0900 (Sun, 09 Sep 2018)

  New Revision: 64665

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64665

  Log:
    thread.c: get rid of false warnings by gcc-8

  Modified files:
    trunk/thread.c
Index: thread.c
===================================================================
--- thread.c	(revision 64664)
+++ thread.c	(revision 64665)
@@ -934,7 +934,7 @@ thread_join_sleep(VALUE arg) https://github.com/ruby/ruby/blob/trunk/thread.c#L934
 {
     struct join_arg *p = (struct join_arg *)arg;
     rb_thread_t *target_th = p->target, *th = p->waiting;
-    rb_hrtime_t end;
+    rb_hrtime_t end = 0;
 
     if (p->limit) {
         end = rb_hrtime_add(*p->limit, rb_hrtime_now());
@@ -3868,7 +3868,7 @@ do_select(VALUE p) https://github.com/ruby/ruby/blob/trunk/thread.c#L3868
     struct select_set *set = (struct select_set *)p;
     int result = 0;
     int lerrno;
-    rb_hrtime_t *to, rel, end;
+    rb_hrtime_t *to, rel, end = 0;
 
     timeout_prepare(&to, &rel, &end, set->timeout);
 #define restore_fdset(dst, src) \
@@ -4028,7 +4028,7 @@ rb_wait_for_single_fd(int fd, int events https://github.com/ruby/ruby/blob/trunk/thread.c#L4028
 {
     struct pollfd fds[2];
     int result = 0, lerrno;
-    rb_hrtime_t *to, rel, end;
+    rb_hrtime_t *to, rel, end = 0;
     int drained;
     rb_thread_t *th = GET_THREAD();
     nfds_t nfds;

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

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