From 004f55212d702e984da0808108c4f3f98f8cb0f5 Mon Sep 17 00:00:00 2001 From: kazu Date: Tue, 24 Jul 2018 09:15:58 +0000 Subject: [PATCH] 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 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process.c b/process.c index f0d1b87434..d1d33dd1b0 100644 --- a/process.c +++ b/process.c @@ -295,7 +295,7 @@ assert_close_on_exec(int fd) 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;