thread.c: get rid of false warnings by gcc-8
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c09fc47a9f
commit
f419aa7bdf
6
thread.c
6
thread.c
@ -934,7 +934,7 @@ thread_join_sleep(VALUE arg)
|
|||||||
{
|
{
|
||||||
struct join_arg *p = (struct join_arg *)arg;
|
struct join_arg *p = (struct join_arg *)arg;
|
||||||
rb_thread_t *target_th = p->target, *th = p->waiting;
|
rb_thread_t *target_th = p->target, *th = p->waiting;
|
||||||
rb_hrtime_t end;
|
rb_hrtime_t end = 0;
|
||||||
|
|
||||||
if (p->limit) {
|
if (p->limit) {
|
||||||
end = rb_hrtime_add(*p->limit, rb_hrtime_now());
|
end = rb_hrtime_add(*p->limit, rb_hrtime_now());
|
||||||
@ -3868,7 +3868,7 @@ do_select(VALUE p)
|
|||||||
struct select_set *set = (struct select_set *)p;
|
struct select_set *set = (struct select_set *)p;
|
||||||
int result = 0;
|
int result = 0;
|
||||||
int lerrno;
|
int lerrno;
|
||||||
rb_hrtime_t *to, rel, end;
|
rb_hrtime_t *to, rel, end = 0;
|
||||||
|
|
||||||
timeout_prepare(&to, &rel, &end, set->timeout);
|
timeout_prepare(&to, &rel, &end, set->timeout);
|
||||||
#define restore_fdset(dst, src) \
|
#define restore_fdset(dst, src) \
|
||||||
@ -4028,7 +4028,7 @@ rb_wait_for_single_fd(int fd, int events, struct timeval *timeout)
|
|||||||
{
|
{
|
||||||
struct pollfd fds[2];
|
struct pollfd fds[2];
|
||||||
int result = 0, lerrno;
|
int result = 0, lerrno;
|
||||||
rb_hrtime_t *to, rel, end;
|
rb_hrtime_t *to, rel, end = 0;
|
||||||
int drained;
|
int drained;
|
||||||
rb_thread_t *th = GET_THREAD();
|
rb_thread_t *th = GET_THREAD();
|
||||||
nfds_t nfds;
|
nfds_t nfds;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user