Updated Branches: refs/heads/3.0.x 6440d907e -> 944d5baba
Fix build issues on gcc4.7 and clang Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/944d5bab Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/944d5bab Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/944d5bab Branch: refs/heads/3.0.x Commit: 944d5babae425706e6238904ee2df621a68ef010 Parents: 6440d90 Author: Brian Geffon <[email protected]> Authored: Wed Apr 25 19:03:14 2012 -0700 Committer: Brian Geffon <[email protected]> Committed: Wed Apr 25 19:03:14 2012 -0700 ---------------------------------------------------------------------- CHANGES | 5 ++++- STATUS | 7 ------- iocore/dns/DNS.cc | 11 +++++++---- lib/ts/MMH.h | 3 ++- lib/ts/Map.h | 34 +++++++++++++++++----------------- proxy/CoreUtils.cc | 4 ++-- 6 files changed, 32 insertions(+), 32 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/944d5bab/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index 8eeae9c..84876ae 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 3.0.5 - + *) [TS-1185] fix build issues with clang + + *) [TS-1116] fix build issues with gcc 4.7 + *) [TS-857] race condition UnixNetVConnection::do_io_close() *) [TS-1158] race condition UnixNetVConnection::mainEvent() when handling http://git-wip-us.apache.org/repos/asf/trafficserver/blob/944d5bab/STATUS ---------------------------------------------------------------------- diff --git a/STATUS b/STATUS index 1f2ac5b..c466e27 100644 --- a/STATUS +++ b/STATUS @@ -41,13 +41,6 @@ A list of all bugs open for the next v3.0.4 release can be found at PATCHES ACCEPTED TO BACKPORT FROM TRUNK: - *) build fails on GCC 4.7 and clang - master SHA: fe1da80b94d368343174ada8b137a0c4ae1c387e - 56c29c0a1dd950eba82039f3f4dcb950a1fdff6b - Jira: https://issues.apache.org/jira/browse/TS-1185 - https://issues.apache.org/jira/browse/TS-1116 - +1: igalic, zwoop, briang - PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] http://git-wip-us.apache.org/repos/asf/trafficserver/blob/944d5bab/iocore/dns/DNS.cc ---------------------------------------------------------------------- diff --git a/iocore/dns/DNS.cc b/iocore/dns/DNS.cc index d57394b..af8f9dd 100644 --- a/iocore/dns/DNS.cc +++ b/iocore/dns/DNS.cc @@ -749,12 +749,15 @@ inline static DNSEntry * get_dns(DNSHandler *h, uint16_t id) { for (DNSEntry *e = h->entries.head; e; e = (DNSEntry *) e->link.next) { - if (e->once_written_flag) - for (int j = 0; j < MAX_DNS_RETRIES; j++) - if (e->id[j] == id) + if (e->once_written_flag) { + for (int j = 0; j < MAX_DNS_RETRIES; j++) { + if (e->id[j] == id) { return e; - else if (e->id[j] < 0) + } else if (e->id[j] < 0) { goto Lnext; + } + } + } Lnext:; } return NULL; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/944d5bab/lib/ts/MMH.h ---------------------------------------------------------------------- diff --git a/lib/ts/MMH.h b/lib/ts/MMH.h index 130387d..c31ed89 100644 --- a/lib/ts/MMH.h +++ b/lib/ts/MMH.h @@ -92,7 +92,8 @@ struct MMH for (i = 0, d = MMH_str, s = (char *) (&(b[0])); i < 8; i++, *d++ = *s++); for (i = 0, s = (char *) (&(b[1])); i < 8; i++, *d++ = *s++); - return (MMH_str); + + return (MMH_str); } void encodeBuffer(unsigned char *buffer, int len) { http://git-wip-us.apache.org/repos/asf/trafficserver/blob/944d5bab/lib/ts/Map.h ---------------------------------------------------------------------- diff --git a/lib/ts/Map.h b/lib/ts/Map.h index a305f6a..81732df 100644 --- a/lib/ts/Map.h +++ b/lib/ts/Map.h @@ -237,7 +237,7 @@ template <class K, class C, class A = DefaultAlloc> class Env { template <class K, class C, class A> inline C Map<K,C,A>::get(K akey) { MapElem<K,C> e(akey, (C)0); - MapElem<K,C> *x = set_in(e); + MapElem<K,C> *x = this->set_in(e); if (x) return x->value; return (C)0; @@ -246,7 +246,7 @@ Map<K,C,A>::get(K akey) { template <class K, class C, class A> inline C * Map<K,C,A>::getp(K akey) { MapElem<K,C> e(akey, (C)0); - MapElem<K,C> *x = set_in(e); + MapElem<K,C> *x = this->set_in(e); if (x) return &x->value; return 0; @@ -255,22 +255,22 @@ Map<K,C,A>::getp(K akey) { template <class K, class C, class A> inline MapElem<K,C> * Map<K,C,A>::put(K akey, C avalue) { MapElem<K,C> e(akey, avalue); - MapElem<K,C> *x = set_in(e); + MapElem<K,C> *x = this->set_in(e); if (x) { x->value = avalue; return x; } else - return set_add(e); + return this->set_add(e); } template <class K, class C, class A> inline MapElem<K,C> * Map<K,C,A>::put(K akey) { MapElem<K,C> e(akey, 0); - MapElem<K,C> *x = set_in(e); + MapElem<K,C> *x = this->set_in(e); if (x) return x; else - return set_add(e); + return this->set_add(e); } template <class K, class C, class A> inline void @@ -463,7 +463,7 @@ ChainHash<C, AHashFns, A>::put(C c) { uintptr_t h = AHashFns::hash(c); List<C,A> *l; MapElem<uintptr_t,List<C,A> > e(h, (C)0); - MapElem<uintptr_t,List<C,A> > *x = set_in(e); + MapElem<uintptr_t,List<C,A> > *x = this->set_in(e); if (x) l = &x->value; else { @@ -482,7 +482,7 @@ ChainHash<C, AHashFns, A>::get(C c) { uintptr_t h = AHashFns::hash(c); List<C> empty; MapElem<uintptr_t,List<C,A> > e(h, empty); - MapElem<uintptr_t,List<C,A> > *x = set_in(e); + MapElem<uintptr_t,List<C,A> > *x = this->set_in(e); if (!x) return 0; List<C> *l = &x->value; @@ -497,7 +497,7 @@ ChainHash<C, AHashFns, A>::put_bag(C c) { uintptr_t h = AHashFns::hash(c); List<C, A> *l; MapElem<uintptr_t,List<C,A> > e(h, (C)0); - MapElem<uintptr_t,List<C,A> > *x = set_in(e); + MapElem<uintptr_t,List<C,A> > *x = this->set_in(e); if (x) l = &x->value; else { @@ -513,7 +513,7 @@ ChainHash<C, AHashFns, A>::get_bag(C c, Vec<C> &v) { uintptr_t h = AHashFns::hash(c); List<C,A> empty; MapElem<uintptr_t,List<C,A> > e(h, empty); - MapElem<uintptr_t,List<C,A> > *x = set_in(e); + MapElem<uintptr_t,List<C,A> > *x = this->set_in(e); if (!x) return 0; List<C,A> *l = &x->value; @@ -537,7 +537,7 @@ ChainHash<C, AHashFns, A>::del(C c) { uintptr_t h = AHashFns::hash(c); List<C> *l; MapElem<uintptr_t,List<C,A> > e(h, (C)0); - MapElem<uintptr_t,List<C,A> > *x = set_in(e); + MapElem<uintptr_t,List<C,A> > *x = this->set_in(e); if (x) l = &x->value; else @@ -564,7 +564,7 @@ ChainHashMap<K, AHashFns, C, A>::put(K akey, C avalue) { List<MapElem<K,C>,A> *l; MapElem<K, C> c(akey, avalue); MapElem<uintptr_t,List<MapElem<K,C>,A> > e(h, empty); - MapElem<uintptr_t,List<MapElem<K,C>,A> > *x = set_in(e); + MapElem<uintptr_t,List<MapElem<K,C>,A> > *x = this->set_in(e); if (x) l = &x->value; else { @@ -585,7 +585,7 @@ ChainHashMap<K, AHashFns, C, A>::get(K akey) { uintptr_t h = AHashFns::hash(akey); List<MapElem<K,C>, A> empty; MapElem<uintptr_t,List<MapElem<K,C>,A> > e(h, empty); - MapElem<uintptr_t,List<MapElem<K,C>,A> > *x = set_in(e); + MapElem<uintptr_t,List<MapElem<K,C>,A> > *x = this->set_in(e); if (!x) return 0; List<MapElem<K,C>,A> *l = &x->value; @@ -603,7 +603,7 @@ ChainHashMap<K, AHashFns, C, A>::put_bag(K akey, C avalue) { List<MapElem<K,C>,A> *l; MapElem<K, C> c(akey, avalue); MapElem<uintptr_t,List<MapElem<K,C>,A> > e(h, empty); - MapElem<uintptr_t,List<MapElem<K,C>,A> > *x = set_in(e); + MapElem<uintptr_t,List<MapElem<K,C>,A> > *x = this->set_in(e); if (x) l = &x->value; else { @@ -622,7 +622,7 @@ ChainHashMap<K, AHashFns, C, A>::get_bag(K akey, Vec<C> &v) { uintptr_t h = AHashFns::hash(akey); List<MapElem<K,C>,A> empty; MapElem<uintptr_t,List<MapElem<K,C>,A> > e(h, empty); - MapElem<uintptr_t,List<MapElem<K,C>,A> > *x = set_in(e); + MapElem<uintptr_t,List<MapElem<K,C>,A> > *x = this->set_in(e); if (!x) return 0; List<MapElem<K,C>,A> *l = &x->value; @@ -638,7 +638,7 @@ ChainHashMap<K, AHashFns, C, A>::del(K akey) { List<MapElem<K,C>,A> empty; List<MapElem<K,C>,A> *l; MapElem<uintptr_t,List<MapElem<K,C>,A> > e(h, empty); - MapElem<uintptr_t,List<MapElem<K,C>,A> > *x = set_in(e); + MapElem<uintptr_t,List<MapElem<K,C>,A> > *x = this->set_in(e); if (x) l = &x->value; else @@ -687,7 +687,7 @@ StringChainHash<F,A>::canonicalize(cchar *s, cchar *e) { else while (*a) h = h * 27 + (unsigned char)*a++; MapElem<uintptr_t,List<cchar*, A> > me(h, (char*)0); - MapElem<uintptr_t,List<cchar*, A> > *x = set_in(me); + MapElem<uintptr_t,List<cchar*, A> > *x = this->set_in(me); if (x) { List<cchar*, A> *l = &x->value; typedef ConsCell<cchar *, A> TT; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/944d5bab/proxy/CoreUtils.cc ---------------------------------------------------------------------- diff --git a/proxy/CoreUtils.cc b/proxy/CoreUtils.cc index e3d21d7..6d34520 100644 --- a/proxy/CoreUtils.cc +++ b/proxy/CoreUtils.cc @@ -344,7 +344,7 @@ CoreUtils::get_base_frame(intptr_t threadId, core_stack_state * coress) intptr_t off2 = abs(vadd - framep); intptr_t size = arrayMem[index - 1].fsize; - memset(coress, 0, sizeof(coress)); + memset(coress, 0, sizeof(*coress)); // seek to the framep offset if (fseek(fp, off + off2, SEEK_SET) != -1) { @@ -456,7 +456,7 @@ CoreUtils::get_base_frame(intptr_t framep, core_stack_state *coress) intptr_t size = arrayMem[index - 1].fsize; intptr_t i = 0; - memset(coress, 0, sizeof(coress)); + memset(coress, 0, sizeof(*coress)); D(printf("stkbase=%p\n", (void*)(vadd + size))); // seek to the framep offset if (fseek(fp, off + off2, SEEK_SET) != -1) {
