You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2010/08/04 01:22:12 UTC
svn commit: r982074 - in /trafficserver/traffic/trunk: iocore/cache/
iocore/cluster/ iocore/dns/ proxy/congest/ proxy/dns_cache/ proxy/http2/
Author: zwoop
Date: Tue Aug 3 23:22:11 2010
New Revision: 982074
URL: http://svn.apache.org/viewvc?rev=982074&view=rev
Log:
TS-400 Checkpoint 7 in cleanup.
Modified:
trafficserver/traffic/trunk/iocore/cache/CacheTest.cc
trafficserver/traffic/trunk/iocore/cluster/ClusterHandler.cc
trafficserver/traffic/trunk/iocore/cluster/ClusterHandlerBase.cc
trafficserver/traffic/trunk/iocore/cluster/ClusterLib.cc
trafficserver/traffic/trunk/iocore/cluster/ClusterMachine.cc
trafficserver/traffic/trunk/iocore/cluster/ClusterProcessor.cc
trafficserver/traffic/trunk/iocore/cluster/ClusterRPC.cc
trafficserver/traffic/trunk/iocore/cluster/ClusterVConnection.cc
trafficserver/traffic/trunk/iocore/dns/DNS.cc
trafficserver/traffic/trunk/proxy/congest/Congestion.cc
trafficserver/traffic/trunk/proxy/congest/CongestionTest.cc
trafficserver/traffic/trunk/proxy/dns_cache/DNS_cache.cc
trafficserver/traffic/trunk/proxy/http2/Hash_Table.cc
trafficserver/traffic/trunk/proxy/http2/HttpBodyFactory.cc
trafficserver/traffic/trunk/proxy/http2/HttpClientSession.cc
trafficserver/traffic/trunk/proxy/http2/HttpConfig.cc
trafficserver/traffic/trunk/proxy/http2/HttpConnectionCount.h
Modified: trafficserver/traffic/trunk/iocore/cache/CacheTest.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/CacheTest.cc?rev=982074&r1=982073&r2=982074&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/CacheTest.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/CacheTest.cc Tue Aug 3 23:22:11 2010
@@ -290,6 +290,7 @@ CacheTestSM::CacheTestSM(const CacheTest
}
EXCLUSIVE_REGRESSION_TEST(cache)(RegressionTest *t, int atype, int *pstatus) {
+ NOWARN_UNUSED(atype);
if (cacheProcessor.IsCacheEnabled() != CACHE_INITIALIZED) {
rprintf(t, "cache not initialized");
*pstatus = REGRESSION_TEST_FAILED;
Modified: trafficserver/traffic/trunk/iocore/cluster/ClusterHandler.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cluster/ClusterHandler.cc?rev=982074&r1=982073&r2=982074&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cluster/ClusterHandler.cc (original)
+++ trafficserver/traffic/trunk/iocore/cluster/ClusterHandler.cc Tue Aug 3 23:22:11 2010
@@ -133,69 +133,69 @@ verify_peters_data(char *ap, int l)
//
/*************************************************************************/
-ClusterHandler::ClusterHandler():
-net_vc(0),
-thread(0),
-ip(0),
-port(0),
-hostname(NULL),
-machine(NULL),
-ifd(-1),
-active(false),
-on_stolen_thread(false),
-n_channels(0),
-channels(NULL),
-channel_data(NULL),
-connector(false),
-cluster_connect_state(ClusterHandler::CLCON_INITIAL),
-needByteSwap(false),
-configLookupFails(0),
-cluster_periodic_event(0),
-read(this, true),
-write(this, false),
-current_time(0),
-last(0),
-last_report(0),
-n_since_last_report(0),
-last_cluster_op_enable(0),
-last_trace_dump(0),
-clm(0),
-disable_remote_cluster_ops(0),
-pw_write_descriptors_built(0),
-pw_freespace_descriptors_built(0),
-pw_controldata_descriptors_built(0), pw_time_expired(0), started_on_stolen_thread(false), control_message_write(false)
+ClusterHandler::ClusterHandler()
+ : net_vc(0),
+ thread(0),
+ ip(0),
+ port(0),
+ hostname(NULL),
+ machine(NULL),
+ ifd(-1),
+ active(false),
+ on_stolen_thread(false),
+ n_channels(0),
+ channels(NULL),
+ channel_data(NULL),
+ connector(false),
+ cluster_connect_state(ClusterHandler::CLCON_INITIAL),
+ needByteSwap(false),
+ configLookupFails(0),
+ cluster_periodic_event(0),
+ read(this, true),
+ write(this, false),
+ current_time(0),
+ last(0),
+ last_report(0),
+ n_since_last_report(0),
+ last_cluster_op_enable(0),
+ last_trace_dump(0),
+ clm(0),
+ disable_remote_cluster_ops(0),
+ pw_write_descriptors_built(0),
+ pw_freespace_descriptors_built(0),
+ pw_controldata_descriptors_built(0), pw_time_expired(0), started_on_stolen_thread(false), control_message_write(false)
#ifdef CLUSTER_STATS
,
-_vc_writes(0),
-_vc_write_bytes(0),
-_control_write_bytes(0),
-_dw_missed_lock(0),
-_dw_not_enabled(0),
-_dw_wait_remote_fill(0),
-_dw_no_active_vio(0),
-_dw_not_enabled_or_no_write(0),
-_dw_set_data_pending(0),
-_dw_no_free_space(0),
-_fw_missed_lock(0),
-_fw_not_enabled(0),
-_fw_wait_remote_fill(0),
-_fw_no_active_vio(0),
-_fw_not_enabled_or_no_read(0),
-_process_read_calls(0),
-_n_read_start(0),
-_n_read_header(0),
-_n_read_await_header(0),
-_n_read_setup_descriptor(0),
-_n_read_descriptor(0),
-_n_read_await_descriptor(0),
-_n_read_setup_data(0),
-_n_read_data(0),
-_n_read_await_data(0),
-_n_read_post_complete(0),
-_n_read_complete(0),
-_process_write_calls(0),
-_n_write_start(0),
-_n_write_setup(0), _n_write_initiate(0), _n_write_await_completion(0), _n_write_post_complete(0), _n_write_complete(0)
+ _vc_writes(0),
+ _vc_write_bytes(0),
+ _control_write_bytes(0),
+ _dw_missed_lock(0),
+ _dw_not_enabled(0),
+ _dw_wait_remote_fill(0),
+ _dw_no_active_vio(0),
+ _dw_not_enabled_or_no_write(0),
+ _dw_set_data_pending(0),
+ _dw_no_free_space(0),
+ _fw_missed_lock(0),
+ _fw_not_enabled(0),
+ _fw_wait_remote_fill(0),
+ _fw_no_active_vio(0),
+ _fw_not_enabled_or_no_read(0),
+ _process_read_calls(0),
+ _n_read_start(0),
+ _n_read_header(0),
+ _n_read_await_header(0),
+ _n_read_setup_descriptor(0),
+ _n_read_descriptor(0),
+ _n_read_await_descriptor(0),
+ _n_read_setup_data(0),
+ _n_read_data(0),
+ _n_read_await_data(0),
+ _n_read_post_complete(0),
+ _n_read_complete(0),
+ _process_write_calls(0),
+ _n_write_start(0),
+ _n_write_setup(0), _n_write_initiate(0), _n_write_await_completion(0), _n_write_post_complete(0), _n_write_complete(0)
#endif
{
#ifdef MSG_TRACE
@@ -430,25 +430,17 @@ bool ClusterHandler::build_initial_vecto
// ......
// iov[count-1] ----> struct descriptor data (element #count)
///////////////////////////////////////////////////////////////////
- int
- i,
- n;
+ int i, n;
// This isn't used.
// MIOBuffer *w;
- ink_hrtime
- now = ink_get_hrtime();
+ ink_hrtime now = ink_get_hrtime();
ClusterState & s = (read_flag ? read : write);
- OutgoingControl *
- oc = s.msg.outgoing_control.head;
- IncomingControl *
- ic = incoming_control.head;
- int
- new_n_iov = 0;
- int
- to_do = 0;
- int
- len;
+ OutgoingControl *oc = s.msg.outgoing_control.head;
+ IncomingControl *ic = incoming_control.head;
+ int new_n_iov = 0;
+ int to_do = 0;
+ int len;
ink_assert(s.iov);
@@ -677,6 +669,9 @@ bool ClusterHandler::build_initial_vecto
s.n_iov = new_n_iov;
return true;
+ // TODO: This is apparently dead code, I added the #if 0 to avoid compiler
+ // warnings, but is this really intentional??
+#if 0
// Release all IOBufferBlock references.
for (n = 0; n < MAX_TCOUNT; ++n) {
s.block[n] = 0;
@@ -685,6 +680,7 @@ bool ClusterHandler::build_initial_vecto
Debug(CL_WARN, "%s delayed for locks", read_flag ? "read" : "write");
free_locks(read_flag, i);
return false;
+#endif
}
bool ClusterHandler::get_read_locks()
@@ -694,20 +690,14 @@ bool ClusterHandler::get_read_locks()
// We are called after each read completion prior to posting completion
///////////////////////////////////////////////////////////////////////
ClusterState & s = read;
- int
- i,
- n;
- int
- bytes_processed;
- int
- vec_bytes_remainder;
- int
- iov_done[MAX_TCOUNT];
+ int i, n;
+ int bytes_processed;
+ int vec_bytes_remainder;
+ int iov_done[MAX_TCOUNT];
memset((char *) iov_done, 0, sizeof(int) * MAX_TCOUNT);
// Compute bytes transferred on a per vector basis
-
bytes_processed = s.did - s.bytes_xfered; // not including bytes in this xfer
i = -1;
@@ -802,8 +792,7 @@ bool ClusterHandler::get_write_locks()
// posting completion.
///////////////////////////////////////////////////////////////////////
ClusterState & s = write;
- int
- i;
+ int i;
for (i = 0; i < s.msg.count; ++i) {
if ((s.msg.descriptor[i].type == CLUSTER_SEND_DATA)
@@ -2531,6 +2520,7 @@ ClusterHandler::mainClusterEvent(int eve
int
ClusterHandler::process_read(ink_hrtime now)
{
+ NOWARN_UNUSED(now);
#ifdef CLUSTER_STATS
_process_read_calls++;
#endif
Modified: trafficserver/traffic/trunk/iocore/cluster/ClusterHandlerBase.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cluster/ClusterHandlerBase.cc?rev=982074&r1=982073&r2=982074&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cluster/ClusterHandlerBase.cc (original)
+++ trafficserver/traffic/trunk/iocore/cluster/ClusterHandlerBase.cc Tue Aug 3 23:22:11 2010
@@ -54,6 +54,8 @@ ClusterCalloutContinuation::~ClusterCall
int
ClusterCalloutContinuation::CalloutHandler(int event, Event * e)
{
+ NOWARN_UNUSED(event);
+ NOWARN_UNUSED(e);
return _ch->process_incoming_callouts(this->mutex);
}
@@ -767,7 +769,7 @@ ClusterHandler::machine_down()
#ifdef NON_MODULAR
machine_offline_APIcallout(ip);
#endif
- snprintf(textbuf, sizeof(textbuf), "%u.%u.%u.%u:%d", DOT_SEPARATED(ip), port);
+ snprintf(textbuf, sizeof(textbuf), "%hu.%hu.%hu.%hu:%d", DOT_SEPARATED(ip), port);
REC_SignalManager(REC_SIGNAL_MACHINE_DOWN, textbuf);
if (net_vc) {
net_vc->do_io(VIO::CLOSE);
@@ -796,6 +798,7 @@ ClusterHandler::machine_down()
int
ClusterHandler::zombify(Event * e)
{
+ NOWARN_UNUSED(e);
//
// Node associated with *this is declared down, setup the event to cleanup
// and defer deletion of *this
@@ -855,16 +858,13 @@ ClusterHandler::connectClusterEvent(int
opt.addr_binding = NetVCOptions::INTF_ADDR;
opt.local_addr = this_cluster_machine()->ip;
- Action *act = netProcessor.connect_re(this, machine->ip,
- machine->cluster_port
- ? machine->cluster_port
- : cluster_port,
- &opt);
-
- NOWARN_UNUSED(act);
-
+ // TODO: Should we check the Action* returned here?
+ netProcessor.connect_re(this, machine->ip,
+ machine->cluster_port
+ ? machine->cluster_port
+ : cluster_port,
+ &opt);
return EVENT_DONE;
-
} else {
if (event == NET_EVENT_OPEN) {
net_vc = (NetVConnection *) e;
@@ -1036,9 +1036,9 @@ ClusterHandler::startClusterEvent(int ev
if (cc && cc->find(ip, port)) {
ClusterConfiguration *c = this_cluster()->current_configuration();
if (!c->find(ip, port)) {
- ClusterConfiguration *cc = configuration_add_machine(c, machine);
+ ClusterConfiguration *cconf = configuration_add_machine(c, machine);
CLUSTER_INCREMENT_DYN_STAT(CLUSTER_NODES_STAT);
- this_cluster()->configurations.push(cc);
+ this_cluster()->configurations.push(cconf);
} else {
// duplicate cluster connect, ignore
failed = -2;
@@ -1069,7 +1069,7 @@ ClusterHandler::startClusterEvent(int ev
machine_online_APIcallout(ip);
#endif
// Signal the manager
- snprintf(textbuf, sizeof(textbuf), "%u.%u.%u.%u:%d", DOT_SEPARATED(ip), port);
+ snprintf(textbuf, sizeof(textbuf), "%hu.%hu.%hu.%hu:%d", DOT_SEPARATED(ip), port);
REC_SignalManager(REC_SIGNAL_MACHINE_UP, textbuf);
#ifdef LOCAL_CLUSTER_TEST_MODE
Note("machine up %u.%u.%u.%u:%d, protocol version=%d.%d",
@@ -1158,6 +1158,7 @@ ClusterHandler::startClusterEvent(int ev
int
ClusterHandler::beginClusterEvent(int event, Event * e)
{
+ NOWARN_UNUSED(event);
// Establish the main periodic Cluster event
#ifdef CLUSTER_IMMEDIATE_NETIO
build_poll(false);
@@ -1183,6 +1184,7 @@ ClusterHandler::zombieClusterEvent(int e
int
ClusterHandler::protoZombieEvent(int event, Event * e)
{
+ NOWARN_UNUSED(event);
//
// Node associated with *this is declared down.
// After cleanup is complete, setup handler to delete *this
@@ -1335,7 +1337,7 @@ ClusterHandler::dump_internal_data()
char *b = message_blk->data->data();
unsigned int b_size = message_blk->data->block_size();
- r = snprintf(&b[n], b_size - n, "Host: %u.%u.%u.%u\n", DOT_SEPARATED(ip));
+ r = snprintf(&b[n], b_size - n, "Host: %hu.%hu.%hu.%hu\n", DOT_SEPARATED(ip));
n += r;
r = snprintf(&b[n], b_size - n,
@@ -1389,10 +1391,10 @@ ClusterHandler::dump_write_msg(int res)
*(uint32 *) & x = (uint32) net_vc->get_remote_addr().sin_addr.s_addr;
fprintf(stderr,
- "[W] %u.%u.%u.%u SeqNo=%d, Cnt=%d, CntlCnt=%d Todo=%d, Res=%d\n",
+ "[W] %hu.%hu.%hu.%hu SeqNo=%u, Cnt=%d, CntlCnt=%d Todo=%d, Res=%d\n",
x[0], x[1], x[2], x[3], write.sequence_number, write.msg.count, write.msg.control_bytes, write.to_do, res);
for (int i = 0; i < write.msg.count; ++i) {
- fprintf(stderr, " d[%i] Type=%d, Chan=%d, SeqNo=%d, Len=%d\n",
+ fprintf(stderr, " d[%i] Type=%d, Chan=%d, SeqNo=%d, Len=%u\n",
i, (write.msg.descriptor[i].type ? 1 : 0),
(int) write.msg.descriptor[i].channel,
(int) write.msg.descriptor[i].sequence_number, write.msg.descriptor[i].length);
@@ -1407,10 +1409,10 @@ ClusterHandler::dump_read_msg()
memset(x, 0, sizeof(x));
*(uint32 *) & x = (uint32) net_vc->get_remote_addr().sin_addr.s_addr;
- fprintf(stderr, "[R] %u.%u.%u.%u SeqNo=%d, Cnt=%d, CntlCnt=%d\n",
+ fprintf(stderr, "[R] %hu.%hu.%hu.%hu SeqNo=%u, Cnt=%d, CntlCnt=%d\n",
x[0], x[1], x[2], x[3], read.sequence_number, read.msg.count, read.msg.control_bytes);
for (int i = 0; i < read.msg.count; ++i) {
- fprintf(stderr, " d[%i] Type=%d, Chan=%d, SeqNo=%d, Len=%d\n",
+ fprintf(stderr, " d[%i] Type=%d, Chan=%d, SeqNo=%d, Len=%u\n",
i, (read.msg.descriptor[i].type ? 1 : 0),
(int) read.msg.descriptor[i].channel,
(int) read.msg.descriptor[i].sequence_number, read.msg.descriptor[i].length);
Modified: trafficserver/traffic/trunk/iocore/cluster/ClusterLib.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cluster/ClusterLib.cc?rev=982074&r1=982073&r2=982074&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cluster/ClusterLib.cc (original)
+++ trafficserver/traffic/trunk/iocore/cluster/ClusterLib.cc Tue Aug 3 23:22:11 2010
@@ -472,6 +472,8 @@ GlobalClusterPeriodicEvent::init()
int
GlobalClusterPeriodicEvent::calloutEvent(Event * e, void *data)
{
+ NOWARN_UNUSED(e);
+ NOWARN_UNUSED(data);
if (time_trace) {
dump_time_buckets();
}
Modified: trafficserver/traffic/trunk/iocore/cluster/ClusterMachine.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cluster/ClusterMachine.cc?rev=982074&r1=982073&r2=982074&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cluster/ClusterMachine.cc (original)
+++ trafficserver/traffic/trunk/iocore/cluster/ClusterMachine.cc Tue Aug 3 23:22:11 2010
@@ -152,7 +152,7 @@ ClusterMachine::~ClusterMachine()
#ifndef INK_NO_CLUSTER
struct MachineTimeoutContinuation;
typedef int (MachineTimeoutContinuation::*McTimeoutContHandler) (int, void *);
-struct MachineTimeoutContinuation:Continuation
+struct MachineTimeoutContinuation: public Continuation
{
ClusterMachine *m;
int dieEvent(int event, Event * e)
@@ -190,7 +190,7 @@ MachineList *
read_MachineList(char *filename, int afd)
{
char line[256];
- int n = -1, i = 0, ln = 0, rlen;
+ int n = -1, i = 0, ln = 0;
MachineList *l = NULL;
ink_assert(filename || (afd != -1));
char p[PATH_NAME_MAX];
@@ -204,9 +204,8 @@ read_MachineList(char *filename, int afd
}
int fd = ((afd != -1) ? afd : open(p, O_RDONLY));
if (fd >= 0) {
- while ((rlen = ink_file_fd_readline(fd, sizeof(line) - 1, line)) > 0) {
+ while (ink_file_fd_readline(fd, sizeof(line) - 1, line) > 0) {
ln++;
-// fprintf(stderr,"line #%d, rlen %d: %s\n",ln,rlen,line);
if (*line == '#')
continue;
if (n == -1 && ParseRules::is_digit(*line)) {
Modified: trafficserver/traffic/trunk/iocore/cluster/ClusterProcessor.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cluster/ClusterProcessor.cc?rev=982074&r1=982073&r2=982074&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cluster/ClusterProcessor.cc (original)
+++ trafficserver/traffic/trunk/iocore/cluster/ClusterProcessor.cc Tue Aug 3 23:22:11 2010
@@ -200,6 +200,7 @@ ClusterProcessor::invoke_remote_data(Clu
void
ClusterProcessor::free_remote_data(char *p, int l)
{
+ NOWARN_UNUSED(l);
char *d = p - sizeof(int32); // reset to ptr to function code
int data_hdr = ClusterControl::DATA_HDR;
@@ -234,7 +235,6 @@ ClusterProcessor::open_local(Continuatio
//
bool immediate = ((options & CLUSTER_OPT_IMMEDIATE) ? true : false);
bool allow_immediate = ((options & CLUSTER_OPT_ALLOW_IMMEDIATE) ? true : false);
- int result;
ClusterHandler *ch = m->clusterHandler;
if (!ch)
@@ -270,7 +270,7 @@ ClusterProcessor::open_local(Continuatio
} else {
if (!(immediate || allow_immediate))
vc->action_ = cont;
- if ((result = vc->start(thread)) < 0) {
+ if (vc->start(thread) < 0) {
return NULL;
}
if (immediate || allow_immediate) {
@@ -291,7 +291,6 @@ ClusterProcessor::connect_local(Continua
//
bool immediate = ((options & CLUSTER_OPT_IMMEDIATE) ? true : false);
bool allow_immediate = ((options & CLUSTER_OPT_ALLOW_IMMEDIATE) ? true : false);
- int result;
#ifdef LOCAL_CLUSTER_TEST_MODE
int ip = inet_addr("127.0.0.1");
@@ -336,7 +335,7 @@ ClusterProcessor::connect_local(Continua
} else {
if (!(immediate || allow_immediate))
vc->action_ = cont;
- if ((result = vc->start(thread)) < 0) {
+ if (vc->start(thread) < 0) {
return NULL;
}
if (immediate || allow_immediate) {
Modified: trafficserver/traffic/trunk/iocore/cluster/ClusterRPC.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cluster/ClusterRPC.cc?rev=982074&r1=982073&r2=982074&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cluster/ClusterRPC.cc (original)
+++ trafficserver/traffic/trunk/iocore/cluster/ClusterRPC.cc Tue Aug 3 23:22:11 2010
@@ -230,6 +230,7 @@ set_channel_data_ClusterFunction(Cluster
void
post_setchan_send_ClusterFunction(ClusterMachine * to, void *data, int len)
{
+ NOWARN_UNUSED(len);
EThread *thread = this_ethread();
ProxyMutex *mutex = thread->mutex;
// We are called on the ET_CLUSTER thread.
@@ -257,6 +258,7 @@ post_setchan_send_ClusterFunction(Cluste
void
set_channel_pin_ClusterFunction(ClusterMachine * from, void *data, int len)
{
+ NOWARN_UNUSED(len);
// This isn't used. /leif
//EThread *thread = this_ethread();
//ProxyMutex *mutex = thread->mutex;
@@ -319,6 +321,7 @@ post_setchan_pin_ClusterFunction(Cluster
void
set_channel_priority_ClusterFunction(ClusterMachine * from, void *data, int len)
{
+ NOWARN_UNUSED(len);
// This isn't used.
//EThread *thread = this_ethread();
//ProxyMutex *mutex = thread->mutex;
@@ -353,6 +356,7 @@ set_channel_priority_ClusterFunction(Clu
void
post_setchan_priority_ClusterFunction(ClusterMachine * to, void *data, int len)
{
+ NOWARN_UNUSED(len);
EThread *thread = this_ethread();
ProxyMutex *mutex = thread->mutex;
Modified: trafficserver/traffic/trunk/iocore/cluster/ClusterVConnection.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cluster/ClusterVConnection.cc?rev=982074&r1=982073&r2=982074&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cluster/ClusterVConnection.cc (original)
+++ trafficserver/traffic/trunk/iocore/cluster/ClusterVConnection.cc Tue Aug 3 23:22:11 2010
@@ -89,6 +89,10 @@ ClusterVConnectionBase::do_io_read(Conti
VIO *
ClusterVConnectionBase::do_io_pread(Continuation * acont, int64 anbytes, MIOBuffer * abuffer, int64 off)
{
+ NOWARN_UNUSED(acont);
+ NOWARN_UNUSED(anbytes);
+ NOWARN_UNUSED(abuffer);
+ NOWARN_UNUSED(off);
ink_assert(!"implemented");
return 0;
}
@@ -96,6 +100,8 @@ ClusterVConnectionBase::do_io_pread(Cont
int
ClusterVConnection::get_header(void **ptr, int *len)
{
+ NOWARN_UNUSED(ptr);
+ NOWARN_UNUSED(len);
ink_assert(!"implemented");
return -1;
}
@@ -103,6 +109,8 @@ ClusterVConnection::get_header(void **pt
int
ClusterVConnection::set_header(void *ptr, int len)
{
+ NOWARN_UNUSED(ptr);
+ NOWARN_UNUSED(len);
ink_assert(!"implemented");
return -1;
}
@@ -110,6 +118,8 @@ ClusterVConnection::set_header(void *ptr
int
ClusterVConnection::get_single_data(void **ptr, int *len)
{
+ NOWARN_UNUSED(ptr);
+ NOWARN_UNUSED(len);
ink_assert(!"implemented");
return -1;
}
@@ -176,31 +186,30 @@ ClusterVConnectionBase::reenable_re(VIO
}
ClusterVConnection::ClusterVConnection(int is_new_connect_read)
- :
-machine(NULL),
-new_connect_read(is_new_connect_read),
-remote_free(0),
-last_local_free(0),
-channel(0),
-close_disabled(0),
-remote_closed(0),
-remote_close_disabled(1),
-remote_lerrno(0),
-start_time(0),
-last_activity_time(0),
-n_set_data_msgs(0),
-n_recv_set_data_msgs(0),
-pending_remote_fill(0),
-have_all_data(0),
-initial_data_bytes(0),
-current_cont(0),
-iov_map(CLUSTER_IOV_NOT_OPEN),
-write_list_tail(0),
-write_list_bytes(0),
-write_bytes_in_transit(0),
-alternate(),
-time_pin(0),
-disk_io_priority(0)
+ : machine(NULL),
+ new_connect_read(is_new_connect_read),
+ remote_free(0),
+ last_local_free(0),
+ channel(0),
+ close_disabled(0),
+ remote_closed(0),
+ remote_close_disabled(1),
+ remote_lerrno(0),
+ start_time(0),
+ last_activity_time(0),
+ n_set_data_msgs(0),
+ n_recv_set_data_msgs(0),
+ pending_remote_fill(0),
+ have_all_data(0),
+ initial_data_bytes(0),
+ current_cont(0),
+ iov_map(CLUSTER_IOV_NOT_OPEN),
+ write_list_tail(0),
+ write_list_bytes(0),
+ write_bytes_in_transit(0),
+ alternate(),
+ time_pin(0),
+ disk_io_priority(0)
{
#ifdef DEBUG
read.vio.buffer.name = "ClusterVConnection.read";
@@ -538,10 +547,7 @@ ClusterVConnection::set_http_info(CacheH
bool ClusterVConnection::set_pin_in_cache(time_t t)
{
- int
- flen;
- SetChanPinMessage
- msg;
+ SetChanPinMessage msg;
//
// set_pin_in_cache() is a mechanism to set an attribute on a
@@ -553,10 +559,10 @@ bool ClusterVConnection::set_pin_in_cach
ink_release_assert(this->read.vio.op == VIO::NONE); // should always be true
time_pin = t;
- int
- vers = SetChanPinMessage::protoToVersion(machine->msg_proto_major);
+ int vers = SetChanPinMessage::protoToVersion(machine->msg_proto_major);
+
if (vers == SetChanPinMessage::SET_CHANNEL_PIN_MESSAGE_VERSION) {
- flen = SetChanPinMessage::sizeof_fixedlen_msg();
+ SetChanPinMessage::sizeof_fixedlen_msg();
} else {
//////////////////////////////////////////////////////////////
// Create the specified down rev version of this message
@@ -581,10 +587,7 @@ time_t ClusterVConnection::get_pin_in_ca
bool ClusterVConnection::set_disk_io_priority(int priority)
{
- int
- flen;
- SetChanPriorityMessage
- msg;
+ SetChanPriorityMessage msg;
//
// set_disk_io_priority() is a mechanism to set an attribute on a
@@ -596,10 +599,10 @@ bool ClusterVConnection::set_disk_io_pri
ink_release_assert(this->read.vio.op == VIO::NONE); // should always be true
disk_io_priority = priority;
- int
- vers = SetChanPriorityMessage::protoToVersion(machine->msg_proto_major);
+ int vers = SetChanPriorityMessage::protoToVersion(machine->msg_proto_major);
+
if (vers == SetChanPriorityMessage::SET_CHANNEL_PRIORITY_MESSAGE_VERSION) {
- flen = SetChanPriorityMessage::sizeof_fixedlen_msg();
+ SetChanPriorityMessage::sizeof_fixedlen_msg();
} else {
//////////////////////////////////////////////////////////////
// Create the specified down rev version of this message
Modified: trafficserver/traffic/trunk/iocore/dns/DNS.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/dns/DNS.cc?rev=982074&r1=982073&r2=982074&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/dns/DNS.cc (original)
+++ trafficserver/traffic/trunk/iocore/dns/DNS.cc Tue Aug 3 23:22:11 2010
@@ -1335,7 +1335,7 @@ dns_process(DNSHandler * handler, HostEn
cp += n;
short int type, cls;
GETSHORT(type, cp);
- GETSHORT(cls, cp);
+ GETSHORT(cls, cp); // NOTE: Don't eliminate this, it'll break badly.
GETLONG(temp_ttl, cp);
if ((temp_ttl < buf->ttl) || (buf->ttl == 0))
buf->ttl = temp_ttl;
Modified: trafficserver/traffic/trunk/proxy/congest/Congestion.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/congest/Congestion.cc?rev=982074&r1=982073&r2=982074&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/congest/Congestion.cc (original)
+++ trafficserver/traffic/trunk/proxy/congest/Congestion.cc Tue Aug 3 23:22:11 2010
@@ -334,7 +334,7 @@ CongestionControlRecord::Print()
#undef PrintSTR
}
-struct CongestionControl_UpdateContinuation:Continuation
+struct CongestionControl_UpdateContinuation: public Continuation
{
int congestion_update_handler(int etype, void *data)
{
@@ -356,6 +356,10 @@ extern void initCongestionDB();
static int
CongestionControlEnabledChanged(const char *name, RecDataT data_type, RecData data, void *cookie)
{
+ NOWARN_UNUSED(name);
+ NOWARN_UNUSED(data_type);
+ NOWARN_UNUSED(data);
+ NOWARN_UNUSED(cookie);
if (congestionControlEnabled == 1 || congestionControlEnabled == 2) {
revalidateCongestionDB();
}
@@ -365,7 +369,10 @@ CongestionControlEnabledChanged(const ch
static int
CongestionControlFile_CB(const char *name, RecDataT data_type, RecData data, void *cookie)
{
+ NOWARN_UNUSED(name);
+ NOWARN_UNUSED(data_type);
NOWARN_UNUSED(data);
+ NOWARN_UNUSED(cookie);
eventProcessor.schedule_imm(new CongestionControl_UpdateContinuation(reconfig_mutex), ET_NET);
return 0;
}
@@ -373,6 +380,10 @@ CongestionControlFile_CB(const char *nam
static int
CongestionControlDefaultSchemeChanged(const char *name, RecDataT data_type, RecData data, void *cookie)
{
+ NOWARN_UNUSED(name);
+ NOWARN_UNUSED(data_type);
+ NOWARN_UNUSED(data);
+ NOWARN_UNUSED(cookie);
if (strcasecmp(DEFAULT_congestion_scheme_str, "per_host") == 0) {
DEFAULT_congestion_scheme = PER_HOST;
} else {
@@ -384,6 +395,10 @@ CongestionControlDefaultSchemeChanged(co
static int
CongestionControlDefaultSNMPChanged(const char *name, RecDataT data_type, RecData data, void *cookie)
{
+ NOWARN_UNUSED(name);
+ NOWARN_UNUSED(data_type);
+ NOWARN_UNUSED(data);
+ NOWARN_UNUSED(cookie);
if (strcasecmp(DEFAULT_snmp_str, "on") == 0) {
DEFAULT_snmp = 1;
} else {
Modified: trafficserver/traffic/trunk/proxy/congest/CongestionTest.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/congest/CongestionTest.cc?rev=982074&r1=982073&r2=982074&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/congest/CongestionTest.cc (original)
+++ trafficserver/traffic/trunk/proxy/congest/CongestionTest.cc Tue Aug 3 23:22:11 2010
@@ -42,6 +42,7 @@
* also exercise the resizing of the table
*/
EXCLUSIVE_REGRESSION_TEST(Congestion_HashTable) (RegressionTest * t, int atype, int *pstatus) {
+ NOWARN_UNUSED(atype);
MTHashTable<long, long>*htable = new MTHashTable<long, long>(4);
// add elements to the table;
long i, count = 1 * 1024 * 1024;
@@ -169,7 +170,7 @@ EXCLUSIVE_REGRESSION_TEST(Congestion_Has
/* regesiter events into the FailHistory and the number of events
* should be correct
*/
-struct CCFailHistoryTestCont:Continuation
+struct CCFailHistoryTestCont: public Continuation
{
enum
{ FAIL_WINDOW = 300 };
@@ -282,6 +283,8 @@ CCFailHistoryTestCont::init_events()
int
CCFailHistoryTestCont::schedule_event(int event, Event * e)
{
+ NOWARN_UNUSED(event);
+ NOWARN_UNUSED(e);
if (failEvents == NULL)
return EVENT_DONE;
CCFailHistoryTestCont::FailEvents * f = (CCFailHistoryTestCont::FailEvents *) ink_atomiclist_pop(failEvents);
@@ -320,6 +323,8 @@ CCFailHistoryTestCont::check_history(boo
int
CCFailHistoryTestCont::mainEvent(int event, Event * e)
{
+ NOWARN_UNUSED(event);
+ NOWARN_UNUSED(e);
test_mode = CCFailHistoryTestCont::SIMPLE_TEST;
init_events();
entry->init(rule->pRecord);
@@ -353,6 +358,7 @@ Ldone:
}
EXCLUSIVE_REGRESSION_TEST(Congestion_FailHistory) (RegressionTest * t, int atype, int *pstatus) {
+ NOWARN_UNUSED(atype);
CCFailHistoryTestCont *test = new CCFailHistoryTestCont(new_ProxyMutex(), t);
eventProcessor.schedule_in(test, HRTIME_SECONDS(1));
*pstatus = REGRESSION_TEST_INPROGRESS;
@@ -365,7 +371,7 @@ EXCLUSIVE_REGRESSION_TEST(Congestion_Fai
* exercise the GC of the DB, remove entries from DB
*/
-struct CCCongestionDBTestCont:Continuation
+struct CCCongestionDBTestCont: public Continuation
{
int final_status;
bool complete;
@@ -442,12 +448,12 @@ CCCongestionDBTestCont::get_congest_list
db->RunTodoList(i);
char buf[1024];
Iter it;
- int len;
+
CongestionEntry *pEntry = db->first_entry(i, &it);
while (pEntry) {
cnt++;
if (cnt % 100 == 0) {
- len = pEntry->sprint(buf, 1024, 100);
+ pEntry->sprint(buf, 1024, 100);
fprintf(stderr, "%s", buf);
}
pEntry = db->next_entry(i, &it);
@@ -459,6 +465,8 @@ CCCongestionDBTestCont::get_congest_list
int
CCCongestionDBTestCont::mainEvent(int event, Event * e)
{
+ NOWARN_UNUSED(event);
+ NOWARN_UNUSED(e);
int to_add = 1 * 1024 * 1024;
int i;
int items[10] = { 0 };
@@ -521,6 +529,7 @@ CCCongestionDBTestCont::mainEvent(int ev
}
EXCLUSIVE_REGRESSION_TEST(Congestion_CongestionDB) (RegressionTest * t, int atype, int *pstatus) {
+ NOWARN_UNUSED(atype);
CCCongestionDBTestCont *test = new CCCongestionDBTestCont(new_ProxyMutex(), t);
eventProcessor.schedule_in(test, HRTIME_SECONDS(1));
*pstatus = REGRESSION_TEST_INPROGRESS;
Modified: trafficserver/traffic/trunk/proxy/dns_cache/DNS_cache.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/dns_cache/DNS_cache.cc?rev=982074&r1=982073&r2=982074&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/dns_cache/DNS_cache.cc (original)
+++ trafficserver/traffic/trunk/proxy/dns_cache/DNS_cache.cc Tue Aug 3 23:22:11 2010
@@ -144,6 +144,7 @@ DNS_Cache::send_dns_response()
int
DNS_Cache::req_query(HEADER * hp, unsigned char **cpp, unsigned char *eom)
{
+ NOWARN_UNUSED(hp);
int n;
unsigned char *tmp_cpp;
short type;
Modified: trafficserver/traffic/trunk/proxy/http2/Hash_Table.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/Hash_Table.cc?rev=982074&r1=982073&r2=982074&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/Hash_Table.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/Hash_Table.cc Tue Aug 3 23:22:11 2010
@@ -118,7 +118,6 @@ HashTable::find_request(int index, char
HeaderAlternate *
HashTable::lookup(int index, char *url, HTTPHdr * hdr)
{
- int match_found = 0;
RequestNode *request = NULL;
HeaderAlternate *iterator = NULL;
@@ -131,7 +130,6 @@ HashTable::lookup(int index, char *url,
for (iterator = request->Alternates; iterator != NULL; iterator = iterator->next) {
if (match_Headers(iterator->hdr, hdr)) {
- match_found = 1;
break;
}
}
Modified: trafficserver/traffic/trunk/proxy/http2/HttpBodyFactory.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpBodyFactory.cc?rev=982074&r1=982073&r2=982074&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpBodyFactory.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpBodyFactory.cc Tue Aug 3 23:22:11 2010
@@ -263,6 +263,9 @@ HttpBodyFactory::dump_template_tables(FI
static int
config_callback(const char *name, RecDataT data_type, RecData data, void *cookie)
{
+ NOWARN_UNUSED(name);
+ NOWARN_UNUSED(data_type);
+ NOWARN_UNUSED(data);
HttpBodyFactory *body_factory = (HttpBodyFactory *) cookie;
body_factory->reconfigure();
return (0);
@@ -1040,8 +1043,8 @@ HttpBodyTemplate::build_instantiated_buf
Debug("body_factory_instantiation", " before instantiation: [%s]", template_buffer);
LogAccessHttp la(context->state_machine);
- int ret = Log::access(&la);
- NOWARN_UNUSED(ret);
+
+ Log::access(&la);
buffer = resolve_logfield_string((LogAccess *) & la, template_buffer);
*buflen_return = ((buffer == NULL) ? 0 : strlen(buffer));
Modified: trafficserver/traffic/trunk/proxy/http2/HttpClientSession.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpClientSession.cc?rev=982074&r1=982073&r2=982074&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpClientSession.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpClientSession.cc Tue Aug 3 23:22:11 2010
@@ -426,6 +426,7 @@ HttpClientSession::state_keep_alive(int
int
HttpClientSession::state_api_callout(int event, void *data)
{
+ NOWARN_UNUSED(data);
switch (event) {
case EVENT_NONE:
case EVENT_INTERVAL:
Modified: trafficserver/traffic/trunk/proxy/http2/HttpConfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpConfig.cc?rev=982074&r1=982073&r2=982074&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpConfig.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpConfig.cc Tue Aug 3 23:22:11 2010
@@ -108,6 +108,8 @@ HttpConfigCont::HttpConfigCont()
int
HttpConfigCont::handle_event(int event, void *edata)
{
+ NOWARN_UNUSED(event);
+ NOWARN_UNUSED(edata);
if (ink_atomic_increment((int *) &http_config_changes, -1) == 1) {
HttpConfig::reconfigure();
}
@@ -118,6 +120,10 @@ HttpConfigCont::handle_event(int event,
static int
http_config_cb(const char *name, RecDataT data_type, RecData data, void *cookie)
{
+ NOWARN_UNUSED(name);
+ NOWARN_UNUSED(data_type);
+ NOWARN_UNUSED(data);
+ NOWARN_UNUSED(cookie);
ink_atomic_increment((int *) &http_config_changes, 1);
INK_MEMORY_BARRIER;
@@ -1977,7 +1983,8 @@ HttpConfig::parse_url_expansions(char *u
void *
HttpConfig::cluster_delta_cb(void *opaque_token, char *data_raw, int data_len)
{
-
+ NOWARN_UNUSED(opaque_token);
+ NOWARN_UNUSED(data_len);
int32 delta32 = (int32) atoi(data_raw);
int32 old;
Modified: trafficserver/traffic/trunk/proxy/http2/HttpConnectionCount.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpConnectionCount.h?rev=982074&r1=982073&r2=982074&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpConnectionCount.h (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpConnectionCount.h Tue Aug 3 23:22:11 2010
@@ -22,6 +22,7 @@
*/
//
+#include "ink_defs.h"
#ifndef _HTTP_CONNECTION_COUNT_H_
@@ -104,6 +105,7 @@ private:
}
ConnectionCount(const ConnectionCount & x)
{
+ NOWARN_UNUSED(x);
}
static ConnectionCount *_connectionCount;