From: Willy Tarreau Date: Fri, 7 Sep 2012 20:18:59 +0000 (+0200) Subject: BUILD: shut a gcc warning introduced by commit 269ab31 X-Git-Tag: v1.5-dev12~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aa52bef622bd9749cb45b7c86de215ab8b35a9e7;p=thirdparty%2Fhaproxy.git BUILD: shut a gcc warning introduced by commit 269ab31 Usual warning on unchecked write() on which no operation is possible. --- diff --git a/src/haproxy.c b/src/haproxy.c index def0f3fb9b..f5840d29f7 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 */ }