mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
thread.c: suppress a warning
* thread.c (do_select): initialize timespec variable to suppress a false positive maybe-uninitialized warning by gcc 7 and 8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d9533a0806
commit
c4d09fb299
1 changed files with 5 additions and 1 deletions
6
thread.c
6
thread.c
|
@ -3785,7 +3785,11 @@ do_select(int n, rb_fdset_t *const readfds, rb_fdset_t *const writefds,
|
|||
rb_fdset_t MAYBE_UNUSED(orig_write);
|
||||
rb_fdset_t MAYBE_UNUSED(orig_except);
|
||||
struct timespec to;
|
||||
struct timespec ts;
|
||||
struct timespec ts
|
||||
#if defined(__GNUC__) && (__GNUC__ == 7 || __GNUC__ == 8)
|
||||
= {0, 0}
|
||||
#endif
|
||||
;
|
||||
rb_thread_t *th = GET_THREAD();
|
||||
|
||||
#define do_select_update() \
|
||||
|
|
Loading…
Add table
Reference in a new issue