You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ig...@apache.org on 2012/02/24 23:23:50 UTC

[2/2] git commit: TS-1116 fix clang warnings and errors, especially with make check

TS-1116 fix clang warnings and errors, especially with make check


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/fe1da80b
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/fe1da80b
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/fe1da80b

Branch: refs/heads/master
Commit: fe1da80b94d368343174ada8b137a0c4ae1c387e
Parents: 56c29c0
Author: Igor Galić <ig...@apache.org>
Authored: Fri Feb 24 23:22:25 2012 +0100
Committer: Igor Galić <ig...@apache.org>
Committed: Fri Feb 24 23:22:25 2012 +0100

----------------------------------------------------------------------
 lib/ts/Map.h       |   34 +++++++++++++++++-----------------
 proxy/CoreUtils.cc |    2 +-
 2 files changed, 18 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fe1da80b/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/fe1da80b/proxy/CoreUtils.cc
----------------------------------------------------------------------
diff --git a/proxy/CoreUtils.cc b/proxy/CoreUtils.cc
index 250a95f..25ca992 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) {