rpms/squid/devel squid-3.0.STABLE2-fix_warnings.patch, NONE, 1.1 squid.spec, 1.95, 1.96

Martin Nagy (mnagy) fedora-extras-commits at redhat.com
Thu Apr 3 11:20:44 UTC 2008


Author: mnagy

Update of /cvs/extras/rpms/squid/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8867

Modified Files:
	squid.spec 
Added Files:
	squid-3.0.STABLE2-fix_warnings.patch 
Log Message:
* Thu Apr 03 2008 Martin Nagy <mnagy at redhat.com> - 7:3.0.STABLE2-2
- add %{optflags} to make
- remove warnings about unused return values


squid-3.0.STABLE2-fix_warnings.patch:

--- NEW FILE squid-3.0.STABLE2-fix_warnings.patch ---
diff -up squid-3.0.STABLE2/lib/util.c.fix_warnings squid-3.0.STABLE2/lib/util.c
--- squid-3.0.STABLE2/lib/util.c.fix_warnings	2007-12-06 03:37:15.000000000 +0100
+++ squid-3.0.STABLE2/lib/util.c	2008-04-03 13:00:40.000000000 +0200
@@ -931,8 +931,8 @@ xint64toa(int64_t num)
 void
 default_failure_notify(const char *message)
 {
-    write(2, message, strlen(message));
-    write(2, "\n", 1);
+    if (write(2, message, strlen(message))) {}
+    if (write(2, "\n", 1)) {}
     abort();
 }
 
diff -up squid-3.0.STABLE2/src/tools.cc.fix_warnings squid-3.0.STABLE2/src/tools.cc
--- squid-3.0.STABLE2/src/tools.cc.fix_warnings	2008-04-03 13:05:11.000000000 +0200
+++ squid-3.0.STABLE2/src/tools.cc	2008-04-03 13:07:49.000000000 +0200
@@ -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) */
+    if (system(command)) {}	/* XXX should avoid system(3) */
 
     unlink(filename);
 }
diff -up squid-3.0.STABLE2/src/comm.cc.fix_warnings squid-3.0.STABLE2/src/comm.cc
--- squid-3.0.STABLE2/src/comm.cc.fix_warnings	2008-02-27 11:45:50.000000000 +0100
+++ squid-3.0.STABLE2/src/comm.cc	2008-04-03 13:00:40.000000000 +0200
@@ -2220,7 +2220,7 @@ comm_accept(int fd, IOACB *handler, void
 void CommIO::Initialise() {
     /* Initialize done pipe signal */
     int DonePipe[2];
-    pipe(DonePipe);
+    if (pipe(DonePipe)) {}
     DoneFD = DonePipe[1];
     DoneReadFD = DonePipe[0];
     fd_open(DoneReadFD, FD_PIPE, "async-io completetion event: main");
diff -up squid-3.0.STABLE2/src/StoreIOBuffer.h.fix_warnings squid-3.0.STABLE2/src/StoreIOBuffer.h
--- squid-3.0.STABLE2/src/StoreIOBuffer.h.fix_warnings	2007-08-13 19:20:51.000000000 +0200
+++ squid-3.0.STABLE2/src/StoreIOBuffer.h	2008-04-03 13:00:40.000000000 +0200
@@ -68,8 +68,8 @@ public:
 
     void dump() const
     {
-        fwrite(data, length, 1, stderr);
-        fwrite("\n", 1, 1, stderr);
+        if (fwrite(data, length, 1, stderr)) {}
+        if (fwrite("\n", 1, 1, stderr)) {}
     }
 
     struct


Index: squid.spec
===================================================================
RCS file: /cvs/extras/rpms/squid/devel/squid.spec,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -r1.95 -r1.96
--- squid.spec	13 Mar 2008 13:23:15 -0000	1.95
+++ squid.spec	3 Apr 2008 11:20:02 -0000	1.96
@@ -4,7 +4,7 @@
 
 Name:     squid
 Version:  3.0.STABLE2
-Release:  1%{?dist}
+Release:  2%{?dist}
 Summary:  The Squid proxy caching server
 Epoch:    7
 License:  GPLv2+
@@ -31,6 +31,7 @@
 Patch203: squid-3.0.STABLE1-build.patch
 Patch204: squid-3.0.STABLE1-perlpath.patch
 Patch205: squid-3.0.STABLE1-smb-path.patch
+Patch206: squid-3.0.STABLE2-fix_warnings.patch
 
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires: bash >= 2.0
@@ -61,9 +62,10 @@
 %patch203 -p1 -b .build
 %patch204 -p1 -b .perlpath
 %patch205 -p1 -b .smb-path
+%patch206 -p1 -b .fix_warnings
 
 %build
-export CXXFLAGS="-fPIE" ; export CFLAGS="-fPIE -Os -g -pipe -fsigned-char" ; export LDFLAGS="-pie" ;
+export CXXFLAGS="-fPIE %{optflags}" ; export CFLAGS="-fPIE -Os -g -pipe -fsigned-char %{optflags}" ; export LDFLAGS="-pie" ;
 %configure \
    --exec_prefix=/usr \
    --bindir=%{_sbindir} \
@@ -331,6 +333,10 @@
     chgrp squid /var/cache/samba/winbindd_privileged >/dev/null 2>&1 || :
 
 %changelog
+* Thu Apr 03 2008 Martin Nagy <mnagy at redhat.com> - 7:3.0.STABLE2-2
+- add %%{optflags} to make
+- remove warnings about unused return values
+
 * Tue Mar 13 2008 Martin Nagy <mnagy at redhat.com> - 7:3.0.STABLE2-1
 - upgrade to latest upstream 3.0.STABLE2
 - check config file before starting (#428998)




More information about the scm-commits mailing list