ruby-changes:51815
From: kazu <ko1@a...>
Date: Tue, 24 Jul 2018 18:16:04 +0900 (JST)
Subject: [ruby-changes:51815] kazu:r64029 (trunk): Try to suppress warning on some CI
kazu 2018-07-24 18:15:58 +0900 (Tue, 24 Jul 2018) New Revision: 64029 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64029 Log: Try to suppress warning on some CI http://ci.rvm.jp/results/trunk-asserts-nopara@silicon-docker/1149270 ``` /home/ko1/ruby/src/trunk-asserts-nopara/process.c: In function 'assert_close_on_exec': /home/ko1/ruby/src/trunk-asserts-nopara/process.c:298:9: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result] (void)write(2, m, sizeof(m) - 1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` workaround from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425#c34 Modified files: trunk/process.c Index: process.c =================================================================== --- process.c (revision 64028) +++ process.c (revision 64029) @@ -295,7 +295,7 @@ assert_close_on_exec(int fd) https://github.com/ruby/ruby/blob/trunk/process.c#L295 int flags = fcntl(fd, F_GETFD); if (flags == -1) { static const char m[] = "reserved FD closed unexpectedly?\n"; - (void)write(2, m, sizeof(m) - 1); + (void)!write(2, m, sizeof(m) - 1); return; } if (flags & FD_CLOEXEC) return; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/