From: robertc <> Date: Wed, 22 Dec 2004 00:28:27 +0000 (+0000) Subject: gcc 3.4.2 fixes from Henrik X-Git-Tag: SQUID_3_0_PRE4~959 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aa625860aa59fe9b2f3935050d1bfb6064daf2eb;p=thirdparty%2Fsquid.git gcc 3.4.2 fixes from Henrik --- diff --git a/Makefile.in b/Makefile.in index 7a27e7296e..a8ce5a4c82 100644 --- a/Makefile.in +++ b/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # -# $Id: Makefile.in,v 1.66 2004/12/21 15:16:16 robertc Exp $ +# $Id: Makefile.in,v 1.67 2004/12/21 17:28:27 robertc Exp $ # srcdir = @srcdir@ top_srcdir = @top_srcdir@ diff --git a/include/config.h b/include/config.h index dc261b0aa6..bca42f6ece 100644 --- a/include/config.h +++ b/include/config.h @@ -1,5 +1,5 @@ /* - * $Id: config.h,v 1.14 2004/12/21 16:17:58 hno Exp $ + * $Id: config.h,v 1.15 2004/12/21 17:28:27 robertc Exp $ * * AUTHOR: Duane Wessels * diff --git a/lib/Profiler.c b/lib/Profiler.c index 38ad2aa850..e8054813f2 100644 --- a/lib/Profiler.c +++ b/lib/Profiler.c @@ -1,6 +1,6 @@ /* - * $Id: Profiler.c,v 1.4 2004/12/21 16:17:58 hno Exp $ + * $Id: Profiler.c,v 1.5 2004/12/21 17:28:28 robertc Exp $ * * DEBUG: section 81 CPU Profiling Routines * AUTHOR: Andres Kroonmaa, Sep.2000 diff --git a/lib/cppunit-1.10.0/examples/hierarchy/ChessTest.h b/lib/cppunit-1.10.0/examples/hierarchy/ChessTest.h index eda6c5e45c..8e70c1a263 100644 --- a/lib/cppunit-1.10.0/examples/hierarchy/ChessTest.h +++ b/lib/cppunit-1.10.0/examples/hierarchy/ChessTest.h @@ -16,7 +16,7 @@ public: void testNumberOfPieces() { - CPPUNIT_ASSERT( m_game->getNumberOfPieces () == 32 ); + CPPUNIT_ASSERT( this->m_game->getNumberOfPieces () == 32 ); } }; diff --git a/lib/cppunit-1.10.0/src/cppunit/Makefile.in b/lib/cppunit-1.10.0/src/cppunit/Makefile.in index bd44c48a1f..abb9f0c9ed 100644 --- a/lib/cppunit-1.10.0/src/cppunit/Makefile.in +++ b/lib/cppunit-1.10.0/src/cppunit/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # -# $Id: Makefile.in,v 1.4 2004/12/21 15:16:18 robertc Exp $ +# $Id: Makefile.in,v 1.5 2004/12/21 17:28:28 robertc Exp $ # SOURCES = $(libcppunit_la_SOURCES) diff --git a/lib/hash.c b/lib/hash.c index 7fac464149..9d2b6272de 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -1,6 +1,6 @@ /* - * $Id: hash.c,v 1.16 2004/12/21 16:17:58 hno Exp $ + * $Id: hash.c,v 1.17 2004/12/21 17:28:28 robertc Exp $ * * DEBUG: section 0 Hash Tables * AUTHOR: Harvest Derived diff --git a/lib/libTrie/include/Trie.h b/lib/libTrie/include/Trie.h index 856595689c..1551c9badc 100644 --- a/lib/libTrie/include/Trie.h +++ b/lib/libTrie/include/Trie.h @@ -37,7 +37,7 @@ #ifndef __cplusplus /* TODO: provide parameterisation for C bindings */ -void *TrieCreate (); +void *TrieCreate (void); void TrieDestroy (void *); void *TrieFind (void *, char const *, size_t); int TrieAdd (void *, char const *, size_t, void *); diff --git a/lib/radix.c b/lib/radix.c index fb5c4a77fe..9f60802654 100644 --- a/lib/radix.c +++ b/lib/radix.c @@ -1,5 +1,5 @@ /* - * $Id: radix.c,v 1.21 2004/12/21 16:17:58 hno Exp $ + * $Id: radix.c,v 1.22 2004/12/21 17:28:28 robertc Exp $ * * DEBUG: section 53 Radix tree data structure implementation * AUTHOR: NetBSD Derived diff --git a/lib/util.c b/lib/util.c index ce66f75929..da822b64b0 100644 --- a/lib/util.c +++ b/lib/util.c @@ -1,6 +1,6 @@ /* - * $Id: util.c,v 1.91 2004/12/21 16:17:58 hno Exp $ + * $Id: util.c,v 1.92 2004/12/21 17:28:28 robertc Exp $ * * DEBUG: * AUTHOR: Harvest Derived diff --git a/src/ACLChecklist.cc b/src/ACLChecklist.cc index fe43a93cd8..dc56480c64 100644 --- a/src/ACLChecklist.cc +++ b/src/ACLChecklist.cc @@ -1,5 +1,5 @@ /* - * $Id: ACLChecklist.cc,v 1.22 2004/12/20 17:35:58 robertc Exp $ + * $Id: ACLChecklist.cc,v 1.23 2004/12/21 17:28:28 robertc Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -272,18 +272,14 @@ ACLChecklist::operator new (size_t size) assert (size == sizeof(ACLChecklist)); CBDATA_INIT_TYPE(ACLChecklist); ACLChecklist *result = cbdataAlloc(ACLChecklist); - /* Mark result as being owned - we want the refcounter to do the delete - * call */ - return cbdataReference(result); + return result; } void ACLChecklist::operator delete (void *address) { ACLChecklist *t = static_cast(address); - cbdataFree(address); - /* And allow the memory to be freed */ - cbdataReferenceDone (t); + cbdataFree(t); } ACLChecklist::ACLChecklist() : accessList (NULL), my_port (0), request (NULL), diff --git a/src/DiskIO/Blocking/BlockingFile.cc b/src/DiskIO/Blocking/BlockingFile.cc index 49dc2525b8..66d2ca483d 100644 --- a/src/DiskIO/Blocking/BlockingFile.cc +++ b/src/DiskIO/Blocking/BlockingFile.cc @@ -1,6 +1,6 @@ /* - * $Id: BlockingFile.cc,v 1.1 2004/12/20 16:30:38 robertc Exp $ + * $Id: BlockingFile.cc,v 1.2 2004/12/21 17:28:29 robertc Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Robert Collins @@ -47,7 +47,6 @@ BlockingFile::operator new (size_t) BlockingFile *result = cbdataAlloc(BlockingFile); /* Mark result as being owned - we want the refcounter to do the delete * call */ - cbdataReference(result); return result; } @@ -55,9 +54,7 @@ void BlockingFile::operator delete (void *address) { BlockingFile *t = static_cast(address); - cbdataFree(address); - /* And allow the memory to be freed */ - cbdataReferenceDone (t); + cbdataFree(t); } BlockingFile::BlockingFile (char const *aPath) : fd (-1), closed (true), error_(false) diff --git a/src/DiskIO/DiskDaemon/DiskdFile.cc b/src/DiskIO/DiskDaemon/DiskdFile.cc index 96cb41d5c9..27e847a8b5 100644 --- a/src/DiskIO/DiskDaemon/DiskdFile.cc +++ b/src/DiskIO/DiskDaemon/DiskdFile.cc @@ -1,6 +1,6 @@ /* - * $Id: DiskdFile.cc,v 1.1 2004/12/20 16:30:38 robertc Exp $ + * $Id: DiskdFile.cc,v 1.2 2004/12/21 17:28:29 robertc Exp $ * * DEBUG: section 79 Squid-side DISKD I/O functions. * AUTHOR: Duane Wessels @@ -57,7 +57,6 @@ DiskdFile::operator new (size_t) DiskdFile *result = cbdataAlloc(DiskdFile); /* Mark result as being owned - we want the refcounter to do the delete * call */ - cbdataReference(result); debug (79,3)("diskdFile with base %p allocating\n", result); return result; } @@ -65,11 +64,9 @@ DiskdFile::operator new (size_t) void DiskdFile::operator delete (void *address) { - debug (79,3)("diskdFile with base %p deleting\n",address); DiskdFile *t = static_cast(address); - cbdataFree(address); - /* And allow the memory to be freed */ - cbdataReferenceDone (t); + debug (79,3)("diskdFile with base %p deleting\n",t); + cbdataFree(t); } DiskdFile::DiskdFile (char const *aPath, DiskdIOStrategy *anIO) : errorOccured (false), IO(anIO), diff --git a/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc b/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc index fe86b4176a..bd4520d31a 100644 --- a/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc +++ b/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc @@ -1,6 +1,6 @@ /* - * $Id: DiskThreadsDiskFile.cc,v 1.1 2004/12/20 16:30:38 robertc Exp $ + * $Id: DiskThreadsDiskFile.cc,v 1.2 2004/12/21 17:28:29 robertc Exp $ * * DEBUG: section 79 Disk IO Routines * AUTHOR: Robert Collins @@ -52,18 +52,14 @@ DiskThreadsDiskFile::operator new (size_t) { CBDATA_INIT_TYPE(DiskThreadsDiskFile); DiskThreadsDiskFile *result = cbdataAlloc(DiskThreadsDiskFile); - /* Mark result as being owned - we want the refcounter to do the delete - * call */ - return cbdataReference(result); + return result; } void DiskThreadsDiskFile::operator delete (void *address) { DiskThreadsDiskFile *t = static_cast(address); - cbdataFree(address); - /* And allow the memory to be freed */ - cbdataReferenceDone (t); + cbdataFree(t); } DiskThreadsDiskFile::DiskThreadsDiskFile (char const *aPath, DiskThreadsIOStrategy *anIO):fd(-1), errorOccured (false), IO(anIO), diff --git a/src/ESI.cc b/src/ESI.cc index 7518e38091..28c5771bf5 100644 --- a/src/ESI.cc +++ b/src/ESI.cc @@ -1,6 +1,6 @@ /* - * $Id: ESI.cc,v 1.11 2004/12/20 16:30:32 robertc Exp $ + * $Id: ESI.cc,v 1.12 2004/12/21 17:28:28 robertc Exp $ * * DEBUG: section 86 ESI processing * AUTHOR: Robert Collins @@ -291,10 +291,6 @@ ESIContext::operator new(size_t byteCount) assert (byteCount == sizeof (ESIContext)); CBDATA_INIT_TYPE(ESIContext); ESIContext *result = cbdataAlloc(ESIContext); - /* Mark result as being owned - we want the refcounter to do the - * delete call - */ - cbdataReference(result); return result; } @@ -303,8 +299,6 @@ ESIContext::operator delete (void *address) { ESIContext *t = static_cast(address); cbdataFree(t); - /* And allow the memory to be freed */ - cbdataReferenceDone (address); } void @@ -637,7 +631,7 @@ ESIContext::send () /* TODO: skip data until pos == next->readoff; */ assert (thisNode->data == this); clientStreamNode *next = thisNode->next(); - cbdataReference (this); + ESIContext *templock = cbdataReference (this); size_t len = 0; if (outbound.getRaw()) @@ -687,9 +681,8 @@ ESIContext::send () if (len == 0) len = 1; /* tell the caller we sent something (because we sent headers */ - ESIContext *temp = this; - cbdataReferenceDone (temp); + cbdataReferenceDone (templock); debug (86,5)("ESIContext::send: this=%p sent %d\n",this,len); diff --git a/src/ESIInclude.cc b/src/ESIInclude.cc index 19d51989f6..b8e45acc68 100644 --- a/src/ESIInclude.cc +++ b/src/ESIInclude.cc @@ -1,6 +1,6 @@ /* - * $Id: ESIInclude.cc,v 1.4 2004/08/30 05:12:31 robertc Exp $ + * $Id: ESIInclude.cc,v 1.5 2004/12/21 17:28:29 robertc Exp $ * * DEBUG: section 86 ESI processing * AUTHOR: Robert Collins @@ -233,10 +233,6 @@ ESIStreamContext::operator new(size_t byteCount) assert (byteCount == sizeof (ESIStreamContext)); CBDATA_INIT_TYPE(ESIStreamContext); ESIStreamContext *result = cbdataAlloc(ESIStreamContext); - /* Mark result as being owned - we want the refcounter to do the - * delete call - */ - cbdataReference(result); return result; } @@ -245,8 +241,6 @@ ESIStreamContext::operator delete (void *address) { ESIStreamContext *t = static_cast(address); cbdataFree(t); - /* And allow the memory to be freed */ - cbdataReferenceDone (address); } ESIStreamContext * diff --git a/src/IPInterception.cc b/src/IPInterception.cc index 034250a9d2..7ee81d5098 100644 --- a/src/IPInterception.cc +++ b/src/IPInterception.cc @@ -1,6 +1,6 @@ /* - * $Id: IPInterception.cc,v 1.8 2004/12/21 16:17:59 hno Exp $ + * $Id: IPInterception.cc,v 1.9 2004/12/21 17:28:29 robertc Exp $ * * DEBUG: section 89 NAT / IP Interception * AUTHOR: Robert Collins diff --git a/src/Makefile.am b/src/Makefile.am index 118f51a831..c2f3dd48e6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.100 2004/12/20 18:14:31 robertc Exp $ +# $Id: Makefile.am,v 1.101 2004/12/21 17:28:29 robertc Exp $ # # Uncomment and customize the following to suit your needs: # @@ -937,7 +937,8 @@ tests_testAuth_SOURCES= tests/testAuth.cc tests/testMain.cc tests/testAuth.h $( tests_testAuth_LDADD= \ @AUTH_LINKOBJS@ @AUTH_OBJS@ \ -L../lib -lmiscutil \ - @SQUID_CPPUNIT_LA@ + @SQUID_CPPUNIT_LA@ \ + @SSLLIB@ tests_testAuth_LDFLAGS = $(LIBADD_DL) tests_testAuth_DEPENDENCIES = $(top_builddir)/lib/libmiscutil.a \ @AUTH_LINKOBJS@ \ diff --git a/src/Makefile.in b/src/Makefile.in index 692e9e72c1..66d7f89fe4 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -17,7 +17,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.in,v 1.331 2004/12/20 18:14:31 robertc Exp $ +# $Id: Makefile.in,v 1.332 2004/12/21 17:28:29 robertc Exp $ # # Uncomment and customize the following to suit your needs: # @@ -1440,7 +1440,8 @@ tests_testAuth_SOURCES = tests/testAuth.cc tests/testMain.cc tests/testAuth.h $ tests_testAuth_LDADD = \ @AUTH_LINKOBJS@ @AUTH_OBJS@ \ -L../lib -lmiscutil \ - @SQUID_CPPUNIT_LA@ + @SQUID_CPPUNIT_LA@ \ + @SSLLIB@ tests_testAuth_LDFLAGS = $(LIBADD_DL) tests_testAuth_DEPENDENCIES = $(top_builddir)/lib/libmiscutil.a \ diff --git a/src/cachemgr.cc b/src/cachemgr.cc index 21e66b8950..8697dd4e70 100644 --- a/src/cachemgr.cc +++ b/src/cachemgr.cc @@ -1,6 +1,6 @@ /* - * $Id: cachemgr.cc,v 1.106 2004/12/21 16:17:59 hno Exp $ + * $Id: cachemgr.cc,v 1.107 2004/12/21 17:28:29 robertc Exp $ * * DEBUG: section 0 CGI Cache Manager * AUTHOR: Duane Wessels diff --git a/src/client_side_request.cc b/src/client_side_request.cc index eadecb0910..eba596bf46 100644 --- a/src/client_side_request.cc +++ b/src/client_side_request.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side_request.cc,v 1.42 2004/12/20 16:30:35 robertc Exp $ + * $Id: client_side_request.cc,v 1.43 2004/12/21 17:28:29 robertc Exp $ * * DEBUG: section 85 Client-side Request Routines * AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c) @@ -91,18 +91,14 @@ ClientRequestContext::operator new (size_t size) assert (size == sizeof(ClientRequestContext)); CBDATA_INIT_TYPE(ClientRequestContext); ClientRequestContext *result = cbdataAlloc(ClientRequestContext); - /* Mark result as being owned - we want the refcounter to do the delete - * call */ - return cbdataReference(result); + return result; } void ClientRequestContext::operator delete (void *address) { ClientRequestContext *t = static_cast(address); - cbdataFree(address); - /* And allow the memory to be freed */ - cbdataReferenceDone (t); + cbdataFree(t); } /* Local functions */ @@ -143,18 +139,14 @@ ClientHttpRequest::operator new (size_t size) assert (size == sizeof (ClientHttpRequest)); CBDATA_INIT_TYPE(ClientHttpRequest); ClientHttpRequest *result = cbdataAlloc(ClientHttpRequest); - /* Mark result as being owned - we want the refcounter to do the delete - * call */ - return cbdataReference(result); + return result; } void ClientHttpRequest::operator delete (void *address) { - ClientHttpRequest *temp = static_cast(address); - cbdataFree(address); - /* And allow the memory to be freed */ - cbdataReferenceDone (temp); + ClientHttpRequest *t = static_cast(address); + cbdataFree(t); } ClientHttpRequest::ClientHttpRequest() : loggingEntry_(NULL) diff --git a/src/dnsserver.cc b/src/dnsserver.cc index faeb8a5d36..0adf260f26 100644 --- a/src/dnsserver.cc +++ b/src/dnsserver.cc @@ -1,6 +1,6 @@ /* - * $Id: dnsserver.cc,v 1.68 2004/12/21 16:17:59 hno Exp $ + * $Id: dnsserver.cc,v 1.69 2004/12/21 17:28:29 robertc Exp $ * * DEBUG: section 0 DNS Resolver * AUTHOR: Harvest Derived diff --git a/src/fs/ufs/StoreFSufs.h b/src/fs/ufs/StoreFSufs.h index 931cfa0eb6..f622a83cb2 100644 --- a/src/fs/ufs/StoreFSufs.h +++ b/src/fs/ufs/StoreFSufs.h @@ -1,6 +1,6 @@ /* - * $Id: StoreFSufs.h,v 1.3 2004/12/20 16:30:45 robertc Exp $ + * $Id: StoreFSufs.h,v 1.4 2004/12/21 17:28:29 robertc Exp $ * * SQUID Web Proxy Cache http://www.squid-cache.org/ * ---------------------------------------------------------- @@ -36,8 +36,8 @@ #include "squid.h" #include "ufscommon.h" +#include "DiskIO/DiskIOModule.h" -class DiskIOModule; template diff --git a/src/fs/ufs/ufscommon.cc b/src/fs/ufs/ufscommon.cc index 3946e4af5a..0fb895e82b 100644 --- a/src/fs/ufs/ufscommon.cc +++ b/src/fs/ufs/ufscommon.cc @@ -1,5 +1,5 @@ /* - * $Id: ufscommon.cc,v 1.1 2004/12/20 16:30:45 robertc Exp $ + * $Id: ufscommon.cc,v 1.2 2004/12/21 17:28:30 robertc Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Robert Collins @@ -50,18 +50,14 @@ RebuildState::operator new (size_t size) assert (size == sizeof(RebuildState)); CBDATA_INIT_TYPE(RebuildState); RebuildState *result = cbdataAlloc(RebuildState); - /* Mark result as being owned - we want the refcounter to do the delete - * call */ - return cbdataReference(result); + return result; } void RebuildState::operator delete (void *address) { RebuildState *t = static_cast(address); - cbdataFree(address); - /* And allow the memory to be freed */ - cbdataReferenceDone (t); + cbdataFree(t); } RebuildState::~RebuildState() diff --git a/src/main.cc b/src/main.cc index fdae0fc7f6..ecffe3f036 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,6 +1,6 @@ /* - * $Id: main.cc,v 1.397 2004/12/21 16:18:00 hno Exp $ + * $Id: main.cc,v 1.398 2004/12/21 17:28:29 robertc Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived diff --git a/src/squid.h b/src/squid.h index b435be0135..31e7ce5ac2 100644 --- a/src/squid.h +++ b/src/squid.h @@ -1,6 +1,6 @@ /* - * $Id: squid.h,v 1.242 2004/12/21 16:18:00 hno Exp $ + * $Id: squid.h,v 1.243 2004/12/21 17:28:29 robertc Exp $ * * AUTHOR: Duane Wessels * diff --git a/src/tests/testAuth.cc b/src/tests/testAuth.cc index a0a58d2d06..1a9638dd8a 100644 --- a/src/tests/testAuth.cc +++ b/src/tests/testAuth.cc @@ -1,7 +1,7 @@ #include "config.h" -#include "testAuth.h" #include "squid.h" +#include "testAuth.h" #include "authenticate.h" #include "AuthUserRequest.h" #include "AuthScheme.h"