- add %{optflags} to make
- remove warnings about unused return values
This commit is contained in:
parent
43fe4737fa
commit
fd15825d7b
52
squid-3.0.STABLE2-fix_warnings.patch
Normal file
52
squid-3.0.STABLE2-fix_warnings.patch
Normal file
@ -0,0 +1,52 @@
|
||||
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
|
10
squid.spec
10
squid.spec
@ -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 @@ Patch202: squid-3.0.STABLE1-location.patch
|
||||
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 @@ lookup program (dnsserver), a program for retrieving FTP data
|
||||
%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 @@ fi
|
||||
chgrp squid /var/cache/samba/winbindd_privileged >/dev/null 2>&1 || :
|
||||
|
||||
%changelog
|
||||
* Thu Apr 03 2008 Martin Nagy <mnagy@redhat.com> - 7:3.0.STABLE2-2
|
||||
- add %%{optflags} to make
|
||||
- remove warnings about unused return values
|
||||
|
||||
* Tue Mar 13 2008 Martin Nagy <mnagy@redhat.com> - 7:3.0.STABLE2-1
|
||||
- upgrade to latest upstream 3.0.STABLE2
|
||||
- check config file before starting (#428998)
|
||||
|
Loading…
Reference in New Issue
Block a user