From aa52bef622bd9749cb45b7c86de215ab8b35a9e7 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 7 Sep 2012 22:18:59 +0200 Subject: [PATCH] BUILD: shut a gcc warning introduced by commit 269ab31 Usual warning on unchecked write() on which no operation is possible. --- src/haproxy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/haproxy.c b/src/haproxy.c index def0f3fb9..f5840d29f 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -1366,7 +1366,7 @@ int main(int argc, char **argv) if (pidfd >= 0) { char pidstr[100]; snprintf(pidstr, sizeof(pidstr), "%d\n", ret); - write(pidfd, pidstr, strlen(pidstr)); + if (write(pidfd, pidstr, strlen(pidstr)) < 0) /* shut gcc warning */; } relative_pid++; /* each child will get a different one */ }