From: Amos Jeffries Date: Sun, 14 Jun 2009 12:44:45 +0000 (+1200) Subject: Author: Alex Rousskov X-Git-Tag: SQUID_3_0_STABLE16~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb6acaa598bb4cf90df1d5d996bbd801ea98e0dd;p=thirdparty%2Fsquid.git Author: Alex Rousskov Prevent "make check" failure on warn_unused_result warning for fwrite(3) call. --- diff --git a/tools/squidclient.cc b/tools/squidclient.cc index 5edb326f44..218911423f 100644 --- a/tools/squidclient.cc +++ b/tools/squidclient.cc @@ -513,8 +513,8 @@ main(int argc, char *argv[]) while ((len = myread(conn, buf, sizeof(buf))) > 0) { fsize += len; - if (to_stdout) - fwrite(buf, len, 1, stdout); + if (to_stdout && fwrite(buf, len, 1, stdout) != 1) + perror("client: ERROR writing to stdout"); } #ifdef _SQUID_MSWIN_