зеркало из https://github.com/github/ruby.git
check return value of `write` to suppress warning.
* ext/-test-/gvl/call_without_gvl/call_without_gvl.c (do_loop): `-Wunused-result` compiler option (gcc?) checks checking return value of `write`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
fb159b492f
Коммит
c6a2de3029
|
@ -38,7 +38,8 @@ do_loop(void *p)
|
|||
struct loop_ctl *ctl = p;
|
||||
|
||||
/* tell the waiting process they can interrupt us, now */
|
||||
write(ctl->notify_fd, "", 1);
|
||||
int err = write(ctl->notify_fd, "", 1);
|
||||
if (err == -1) rb_bug("write error");
|
||||
|
||||
while (!ctl->stop) {
|
||||
struct timeval tv = { 0, 10000 };
|
||||
|
|
Загрузка…
Ссылка в новой задаче