You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by br...@apache.org on 2012/05/22 23:56:57 UTC
git commit: [TS-1116] Fix build issues with clang + gcc4.7
Review/Test: briang, igalic, zwoop Backport: briang
Updated Branches:
refs/heads/3.0.x 816eb26e1 -> 981fc8014
[TS-1116] Fix build issues with clang + gcc4.7
Review/Test: briang, igalic, zwoop
Backport: briang
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/981fc801
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/981fc801
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/981fc801
Branch: refs/heads/3.0.x
Commit: 981fc80142f2924e7b82daed9fe014e56659162c
Parents: 816eb26
Author: Brian Geffon <br...@apache.org>
Authored: Tue May 22 14:55:48 2012 -0700
Committer: Brian Geffon <br...@apache.org>
Committed: Tue May 22 14:55:48 2012 -0700
----------------------------------------------------------------------
CHANGES | 4 ++--
STATUS | 6 ------
iocore/cache/CacheHosting.cc | 4 ++--
lib/ts/Allocator.h | 4 ++--
lib/ts/ink_atomic.h | 2 +-
lib/ts/ink_auth_api.cc | 2 +-
proxy/InkAPITest.cc | 3 +++
7 files changed, 11 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/981fc801/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 894e18c..d4979bd 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,7 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 3.0.5
+ *) [TS-1116] Fix build issues with clang + gcc4.7
+
*) [TS-1049] TS dead locks on HTTPS POST requires.
Author: Wilson Ho
@@ -11,8 +13,6 @@ 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/981fc801/STATUS
----------------------------------------------------------------------
diff --git a/STATUS b/STATUS
index 2128a96..2dbc844 100644
--- a/STATUS
+++ b/STATUS
@@ -46,12 +46,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
[ New proposals should be added at the end of the list ]
- *) Fix build issues with clang
- Jira: https://issues.apache.org/jira/browse/TS-1116
- Trunk Patch:
- http://git-wip-us.apache.org/repos/asf?p=trafficserver.git;a=commit;h=19f3673812d38704d9387dbbffc4c82b4c275f37
- +1: briang, igalic, zwoop
-
STALLED ISSUES
*) key->volume hash table is not consistent when a disk is marked as bad or removed due to failure
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/981fc801/iocore/cache/CacheHosting.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheHosting.cc b/iocore/cache/CacheHosting.cc
index 180b736..df617ea 100644
--- a/iocore/cache/CacheHosting.cc
+++ b/iocore/cache/CacheHosting.cc
@@ -512,7 +512,7 @@ CacheHostRecord::Init(matcher_line * line_info, int typ)
/* first find out the number of volumes */
while (*s) {
- if ((*s == ',')) {
+ if (*s == ',') {
num_cachevols++;
s++;
if (!(*s)) {
@@ -554,7 +554,7 @@ CacheHostRecord::Init(matcher_line * line_info, int typ)
for (; cachep; cachep = cachep->link.next) {
if (cachep->vol_number == volume_number) {
is_vol_present = 1;
- if ((cachep->scheme == type)) {
+ if (cachep->scheme == type) {
Debug("cache_hosting",
"Host Record: %xd, Volume: %d, size: %ld",
this, volume_number, cachep->size * STORE_BLOCK_SIZE);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/981fc801/lib/ts/Allocator.h
----------------------------------------------------------------------
diff --git a/lib/ts/Allocator.h b/lib/ts/Allocator.h
index 2009c0d..bdde959 100644
--- a/lib/ts/Allocator.h
+++ b/lib/ts/Allocator.h
@@ -267,7 +267,7 @@ template<class C> inline C * ClassAllocator<C>::alloc()
for (unsigned int i = 0; i < RND16(sizeof(C)) / sizeof(int64_t); i++)
((int64_t *) ptr)[i] = ((int64_t *) &this->proto.typeObject)[i];
} else
- memcpy(ptr, &this->proto.typeObject, sizeof(C));
+ memcpy(ptr, (void *)&this->proto.typeObject, sizeof(C));
return (C *) ptr;
}
@@ -283,7 +283,7 @@ template<class C> inline C * SparceClassAllocator<C>::alloc()
for (unsigned int i = 0; i < RND16(sizeof(C)) / sizeof(int64_t); i++)
((int64_t *) ptr)[i] = ((int64_t *) &this->proto.typeObject)[i];
} else
- memcpy(ptr, &this->proto.typeObject, sizeof(C));
+ memcpy(ptr, (void *)&this->proto.typeObject, sizeof(C));
} else
(*instantiate) ((C *) &this->proto.typeObject, (C *) ptr);
return (C *) ptr;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/981fc801/lib/ts/ink_atomic.h
----------------------------------------------------------------------
diff --git a/lib/ts/ink_atomic.h b/lib/ts/ink_atomic.h
index 5853e19..3e358c6 100644
--- a/lib/ts/ink_atomic.h
+++ b/lib/ts/ink_atomic.h
@@ -113,7 +113,7 @@ static inline int ink_atomic_cas(pvint32 mem, int old, int new_value) { return _
static inline int ink_atomic_cas_ptr(pvvoidp mem, void* old, void* new_value) { return __sync_bool_compare_and_swap(mem, old, new_value); }
static inline int ink_atomic_increment(pvint32 mem, int value) { return __sync_fetch_and_add(mem, value); }
-static inline void *ink_atomic_increment_ptr(pvvoidp mem, intptr_t value) { return __sync_fetch_and_add((void**)mem, value); }
+static inline void *ink_atomic_increment_ptr(pvvoidp mem, intptr_t value) { return __sync_fetch_and_add((void**)mem, (void*)value); }
// Special hacks for ARM 32-bit
#if defined(__arm__) && (SIZEOF_VOIDP == 4)
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/981fc801/lib/ts/ink_auth_api.cc
----------------------------------------------------------------------
diff --git a/lib/ts/ink_auth_api.cc b/lib/ts/ink_auth_api.cc
index 4926ddc..be82c46 100644
--- a/lib/ts/ink_auth_api.cc
+++ b/lib/ts/ink_auth_api.cc
@@ -27,7 +27,7 @@
#include "ink_code.h"
#include "ink_auth_api.h"
-static int s_rand_seed = time(NULL) + s_rand_seed;
+static int s_rand_seed = time(NULL); // + s_rand_seed;
static InkRand
s_rand_gen(ink_rand_r((unsigned int *) &s_rand_seed) ^ (uintptr_t) &s_rand_seed);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/981fc801/proxy/InkAPITest.cc
----------------------------------------------------------------------
diff --git a/proxy/InkAPITest.cc b/proxy/InkAPITest.cc
index 41d6ca8..0b73638 100644
--- a/proxy/InkAPITest.cc
+++ b/proxy/InkAPITest.cc
@@ -765,6 +765,8 @@ REGRESSION_TEST(SDK_API_TSCache) (RegressionTest * test, int atype, int *pstatus
TSCacheKeyDigestSet(key, key_name, strlen(key_name));
TSCacheKeyDigestSet(key_cmp, key_name, strlen(key_name));
+ // TODO: This comparison makes no sense, since TSCacheKey is an opaque struct
+#if 0
if (memcmp(key, key_cmp, sizeof(TSCacheKey)) != 0) {
SDK_RPRINT(test, "TSCacheKeySetDigest", "TestCase1", TC_FAIL, "digest is wrong");
@@ -777,6 +779,7 @@ REGRESSION_TEST(SDK_API_TSCache) (RegressionTest * test, int atype, int *pstatus
SDK_RPRINT(test, "TSCacheKeySetDigest", "TestCase1", TC_PASS, "ok");
TSCacheKeyDestroy(key_cmp);
}
+#endif
// prepare caching content
// string, null-terminated.