]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Compiler support: fix cc compiler complaints about function results
authorAmos Jeffries <amosjeffries@squid-cache.org>
Fri, 11 Jul 2008 10:35:53 +0000 (04:35 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Fri, 11 Jul 2008 10:35:53 +0000 (04:35 -0600)
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.

lib/util.c
src/StoreIOBuffer.h
src/comm.cc
src/tools.cc

index 076a174dd196be11a00c56aaff547ad802b1ddd5..4e7ec2518a12ad7c8a90bc24f77d8159f8941951 100644 (file)
@@ -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();
 }
 
index 601909497b240a5418b18064c3f4dad84d43dd62..8649e15063fb1839c01b86e4df96315e9bc2fbd8 100644 (file)
@@ -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
index 15cd0b75bcf56a1b340063980008d2391391c8eb..212b6bae4ce2091c5e3da1912636a52634ae5f7b 100644 (file)
@@ -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");
index ee6eafad1cbf28a583be835f999f3051e22d3d7c..93e9d0dfd6f9090d2bd30f5c8307db15af569687 100644 (file)
@@ -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);
 }