From: Amos Jeffries Date: Fri, 11 Jul 2008 10:35:53 +0000 (-0600) Subject: Compiler support: fix cc compiler complaints about function results X-Git-Tag: SQUID_3_0_STABLE8~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0cbef577d4266a55ebff705138e02d165734bb42;p=thirdparty%2Fsquid.git Compiler support: fix cc compiler complaints about function results Fixes warnings produced by cc compiler about unused function results. gcc ignores these. This patch is to fix package generation on Ubuntu. By the looks of it SuSE linux, Fedora Core, and RedHat also benefit. --- diff --git a/lib/util.c b/lib/util.c index 076a174dd1..4e7ec2518a 100644 --- a/lib/util.c +++ b/lib/util.c @@ -931,8 +931,8 @@ xint64toa(int64_t num) void default_failure_notify(const char *message) { - write(2, message, strlen(message)); - write(2, "\n", 1); + (void)write(2, message, strlen(message)); + (void)write(2, "\n", 1); abort(); } diff --git a/src/StoreIOBuffer.h b/src/StoreIOBuffer.h index 601909497b..8649e15063 100644 --- a/src/StoreIOBuffer.h +++ b/src/StoreIOBuffer.h @@ -68,8 +68,8 @@ public: void dump() const { - fwrite(data, length, 1, stderr); - fwrite("\n", 1, 1, stderr); + (void)fwrite(data, length, 1, stderr); + (void)fwrite("\n", 1, 1, stderr); } struct diff --git a/src/comm.cc b/src/comm.cc index 15cd0b75bc..212b6bae4c 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -2220,7 +2220,7 @@ comm_accept(int fd, IOACB *handler, void *handler_data) { void CommIO::Initialise() { /* Initialize done pipe signal */ int DonePipe[2]; - pipe(DonePipe); + (void)pipe(DonePipe); DoneFD = DonePipe[1]; DoneReadFD = DonePipe[0]; fd_open(DoneReadFD, FD_PIPE, "async-io completetion event: main"); diff --git a/src/tools.cc b/src/tools.cc index ee6eafad1c..93e9d0dfd6 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -152,7 +152,7 @@ mail_warranty(void) snprintf(command, 256, "%s %s < %s", Config.EmailProgram, Config.adminEmail, filename); - system(command); /* XXX should avoid system(3) */ + (void)system(command); /* XXX should avoid system(3) */ unlink(filename); }