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 2013/07/15 21:43:42 UTC
[7/7] git commit: TS-1820 Remove more NOWARN usages.
TS-1820 Remove more NOWARN usages.
This commit also eliminates all of mgmt/tools, which was
used for "network management" in e.g. traffic_shell.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/cf21050a
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/cf21050a
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/cf21050a
Branch: refs/heads/master
Commit: cf21050a905faffb0974c8f97a56c0aaa7574467
Parents: 14ac18b
Author: Leif Hedstrom <zw...@apache.org>
Authored: Fri Jul 12 19:10:45 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Mon Jul 15 13:40:34 2013 -0600
----------------------------------------------------------------------
configure.ac | 1 -
iocore/aio/AIO.cc | 3 +-
iocore/cache/Cache.cc | 51 +-
iocore/cache/CacheDir.cc | 14 +-
iocore/cache/CacheDisk.cc | 14 +-
iocore/cache/CacheHosting.cc | 12 +-
iocore/cache/CacheLink.cc | 8 +-
iocore/cache/CacheRead.cc | 30 +-
iocore/cache/CacheTest.cc | 3 +-
iocore/cache/CacheVol.cc | 23 +-
iocore/cache/CacheWrite.cc | 3 -
iocore/cache/P_CacheInternal.h | 8 +-
iocore/cache/RamCacheCLFUS.cc | 63 +-
iocore/cluster/ClusterAPI.cc | 4 +-
iocore/cluster/ClusterCache.cc | 34 +-
iocore/cluster/ClusterConfig.cc | 52 +-
iocore/cluster/ClusterHandler.cc | 3 +-
iocore/cluster/ClusterHandlerBase.cc | 13 +-
iocore/cluster/ClusterLib.cc | 4 +-
iocore/cluster/ClusterLoadMonitor.cc | 5 +-
iocore/cluster/ClusterProcessor.cc | 6 +-
iocore/cluster/ClusterRPC.cc | 15 +-
iocore/cluster/ClusterVConnection.cc | 20 +-
iocore/cluster/P_ClusterCache.h | 29 +-
iocore/dns/DNS.cc | 16 +-
iocore/dns/SplitDNS.cc | 3 +-
iocore/eventsystem/P_UnixSocketManager.h | 21 +-
iocore/eventsystem/Processor.cc | 3 +-
iocore/hostdb/HostDB.cc | 47 +-
iocore/net/P_UDPNet.h | 2 +-
iocore/net/P_UnixNet.h | 2 +-
iocore/net/P_UnixNetProcessor.h | 2 +-
iocore/net/P_UnixNetVConnection.h | 4 +-
iocore/net/SSLUtils.cc | 9 +-
iocore/net/UnixNet.cc | 9 +-
iocore/net/UnixNetProcessor.cc | 7 +-
iocore/net/UnixUDPNet.cc | 7 +-
lib/records/P_RecUtils.h | 1 -
lib/records/RecCore.cc | 26 +-
lib/records/RecLocal.cc | 3 -
lib/records/RecMessage.cc | 24 -
lib/records/RecProcess.cc | 22 +-
lib/records/test_I_RecLocal.cc | 11 +-
lib/records/test_RecProcess.i | 17 +-
lib/records/test_RecTree.cc | 5 +-
lib/ts/ink_defs.h | 3 -
mgmt/LocalManager.cc | 8 +-
mgmt/Main.cc | 8 +-
mgmt/Makefile.am | 4 +-
mgmt/ProcessManager.cc | 3 +-
mgmt/ProxyConfig.cc | 4 +-
mgmt/api/CoreAPI.cc | 11 +-
mgmt/api/CoreAPIShared.cc | 3 +-
mgmt/api/EventControlMain.cc | 3 +-
mgmt/api/GenericParser.cc | 6 +-
mgmt/api/INKMgmtAPI.cc | 129 +-
mgmt/api/TSControlMain.cc | 4 +-
mgmt/api/include/mgmtapi.h | 32 -
mgmt/api/remote/APITestCliRemote.cc | 4 +-
mgmt/api/remote/CoreAPIRemote.cc | 4 +-
mgmt/api/remote/NetworkUtilsRemote.cc | 3 +-
mgmt/cli/CliCreateCommands.cc | 17 -
mgmt/cli/ConfigCmd.cc | 261 +---
mgmt/cli/ConfigCmd.h | 21 -
mgmt/cli/Makefile.am | 4 +-
mgmt/cli/ShowCmd.cc | 154 +-
mgmt/cli/ShowCmd.h | 1 -
mgmt/cli/TrafficLine.cc | 3 +-
mgmt/cli/UtilCmds.cc | 3 +-
mgmt/cli/cliMain.cc | 7 +-
mgmt/cli/cliParseArg.cc | 3 +-
mgmt/cli/hashtable.cc | 3 +-
mgmt/cli/processArgument.cc | 3 +-
mgmt/cluster/ClusterCom.cc | 6 +-
mgmt/cluster/VMap.cc | 4 +-
mgmt/preparse/IPRange.cc | 1 -
mgmt/stats/StatProcessor.cc | 12 +-
mgmt/tools/ConfigAPI.cc | 1268 ----------------
mgmt/tools/ConfigAPI.h | 85 --
mgmt/tools/Makefile.am | 39 -
mgmt/tools/SysAPI.cc | 1981 -------------------------
mgmt/tools/SysAPI.h | 75 -
mgmt/utils/WebMgmtUtils.cc | 8 +-
mgmt/utils/XmlUtils.cc | 3 +-
mgmt/web2/Makefile.am | 1 -
mgmt/web2/WebHttp.cc | 9 +-
mgmt/web2/WebHttpSession.cc | 3 +-
mgmt/web2/WebIntrMain.cc | 7 +-
proxy/CacheControl.cc | 15 +-
proxy/DiagsConfig.cc | 6 +-
proxy/Error.cc | 3 +-
proxy/ICP.cc | 35 +-
proxy/ICP.h | 9 +-
proxy/ICPConfig.cc | 27 +-
proxy/Initialize.cc | 2 -
proxy/InkAPITest.cc | 173 +--
proxy/InkAPITestTool.cc | 12 +-
proxy/Main.cc | 19 +-
proxy/ParentSelection.cc | 5 +-
proxy/Plugin.cc | 3 +-
proxy/PluginVC.cc | 18 +-
proxy/Prefetch.cc | 25 +-
proxy/RegressionSM.cc | 28 +-
proxy/ReverseProxy.cc | 20 +-
proxy/Show.h | 10 +-
proxy/StatPages.cc | 3 +-
proxy/StatPages.h | 2 +-
proxy/StatSystem.cc | 22 +-
proxy/Transform.cc | 17 +-
proxy/UglyLogStubs.cc | 37 +-
proxy/Update.cc | 34 +-
proxy/Update.h | 8 +-
proxy/congest/Congestion.cc | 14 +-
proxy/congest/CongestionDB.cc | 13 +-
proxy/congest/CongestionTest.cc | 24 +-
proxy/hdrs/HTTP.cc | 7 +-
proxy/hdrs/HdrTest.cc | 4 +-
proxy/hdrs/MIME.cc | 15 +-
proxy/hdrs/URL.cc | 3 +-
proxy/http/HttpBodyFactory.cc | 6 +-
proxy/http/HttpClientSession.cc | 3 +-
proxy/http/HttpConfig.cc | 15 +-
proxy/http/HttpConnectionCount.h | 2 +-
proxy/http/HttpPages.cc | 10 +-
proxy/http/HttpSM.cc | 52 +-
proxy/http/HttpSessionManager.cc | 7 +-
proxy/http/HttpTransact.cc | 67 +-
proxy/http/HttpTransact.h | 18 +-
proxy/http/HttpTransactCache.cc | 2 -
proxy/http/HttpTransactHeaders.cc | 10 +-
proxy/http/HttpTransactHeaders.h | 3 +-
proxy/http/HttpUpdateSM.cc | 3 +-
proxy/http/HttpUpdateTester.cc | 3 +-
proxy/http/remap/UrlMappingPathIndex.h | 4 +-
proxy/logging/Log.cc | 41 +-
proxy/logging/LogAccess.cc | 13 +-
proxy/logging/LogCollationClientSM.cc | 22 +-
proxy/logging/LogCollationHostSM.cc | 16 +-
proxy/logging/LogConfig.cc | 13 +-
proxy/logging/LogFieldAliasMap.h | 7 +-
proxy/logging/LogObject.cc | 9 +-
proxy/logging/LogObject.h | 2 +-
proxy/logging/LogStandalone.cc | 9 +-
proxy/logging/LogUtils.cc | 3 +-
proxy/signals.cc | 13 +-
145 files changed, 581 insertions(+), 5255 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 2968d98..27058be 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1844,7 +1844,6 @@ AC_CONFIG_FILES([
mgmt/cluster/Makefile
mgmt/preparse/Makefile
mgmt/stats/Makefile
- mgmt/tools/Makefile
mgmt/utils/Makefile
mgmt/web2/Makefile
plugins/Makefile
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/aio/AIO.cc
----------------------------------------------------------------------
diff --git a/iocore/aio/AIO.cc b/iocore/aio/AIO.cc
index 56cc51a..9f08e9e 100644
--- a/iocore/aio/AIO.cc
+++ b/iocore/aio/AIO.cc
@@ -63,9 +63,8 @@ uint64_t aio_bytes_written = 0;
*/
static int
-aio_stats_cb(const char *name, RecDataT data_type, RecData *data, RecRawStatBlock *rsb, int id)
+aio_stats_cb(const char * /* name ATS_UNUSED */, RecDataT data_type, RecData *data, RecRawStatBlock *rsb, int id)
{
- NOWARN_UNUSED(name);
(void) data_type;
(void) rsb;
int64_t new_val = 0;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/cache/Cache.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc
index 6ef4b66..9f482fd 100644
--- a/iocore/cache/Cache.cc
+++ b/iocore/cache/Cache.cc
@@ -293,12 +293,9 @@ validate_rww(int new_value)
}
static int
-update_cache_config(const char *name, RecDataT data_type, RecData data, void *cookie)
+update_cache_config(const char * /* name ATS_UNUSED */, RecDataT /* data_type ATS_UNUSED */, RecData data,
+ void * /* cookie ATS_UNUSED */)
{
- NOWARN_UNUSED(name);
- NOWARN_UNUSED(data_type);
- NOWARN_UNUSED(cookie);
-
volatile int new_value = validate_rww(data.rec_int);
cache_config_read_while_writer = new_value;
@@ -1990,8 +1987,7 @@ Cache::open_done() {
}
int
-Cache::open(bool clear, bool fix) {
- NOWARN_UNUSED(fix);
+Cache::open(bool clear, bool /* fix ATS_UNUSED */) {
int i;
off_t blocks = 0;
cache_read_done = 0;
@@ -2046,9 +2042,7 @@ Cache::close() {
}
int
-CacheVC::dead(int event, Event *e) {
- NOWARN_UNUSED(e);
- NOWARN_UNUSED(event);
+CacheVC::dead(int /* event ATS_UNUSED */, Event * /*e ATS_UNUSED */) {
ink_assert(0);
return EVENT_DONE;
}
@@ -2079,8 +2073,7 @@ static void unmarshal_helper(Doc *doc, Ptr<IOBufferData> &buf, int &okay) {
#endif
int
-CacheVC::handleReadDone(int event, Event *e) {
- NOWARN_UNUSED(e);
+CacheVC::handleReadDone(int event, Event * /* e ATS_UNUSED */) {
cancel_trigger();
ink_assert(this_ethread() == mutex->thread_holding);
@@ -2097,7 +2090,9 @@ CacheVC::handleReadDone(int event, Event *e) {
if ((!dir_valid(vol, &dir)) || (!io.ok())) {
if (!io.ok()) {
Debug("cache_disk_error", "Read error on disk %s\n \
- read range : [%" PRIu64 " - %" PRIu64 " bytes] [%" PRIu64 " - %" PRIu64 " blocks] \n", vol->hash_id, (uint64_t)io.aiocb.aio_offset, (uint64_t)io.aiocb.aio_offset + io.aiocb.aio_nbytes, (uint64_t)io.aiocb.aio_offset / 512, (uint64_t)(io.aiocb.aio_offset + io.aiocb.aio_nbytes) / 512);
+ read range : [%" PRIu64 " - %" PRIu64 " bytes] [%" PRIu64 " - %" PRIu64 " blocks] \n",
+ vol->hash_id, (uint64_t)io.aiocb.aio_offset, (uint64_t)io.aiocb.aio_offset + io.aiocb.aio_nbytes,
+ (uint64_t)io.aiocb.aio_offset / 512, (uint64_t)(io.aiocb.aio_offset + io.aiocb.aio_nbytes) / 512);
}
goto Ldone;
}
@@ -2119,15 +2114,14 @@ CacheVC::handleReadDone(int event, Event *e) {
if (is_debug_tag_set("cache_read")) {
char xt[33];
- Debug("cache_read"
- , "Read complete on fragment %s. Length: data payload=%d this fragment=%d total doc=%" PRId64" prefix=%d"
- , doc->key.toHexStr(xt), doc->data_len(), doc->len, doc->total_len, doc->prefix_len()
- );
+ Debug("cache_read",
+ "Read complete on fragment %s. Length: data payload=%d this fragment=%d total doc=%" PRId64" prefix=%d",
+ doc->key.toHexStr(xt), doc->data_len(), doc->len, doc->total_len, doc->prefix_len());
}
// put into ram cache?
- if (io.ok() &&
- ((doc->first_key == *read_key) || (doc->key == *read_key) || STORE_COLLISION) && doc->magic == DOC_MAGIC) {
+ if (io.ok() && ((doc->first_key == *read_key) || (doc->key == *read_key) || STORE_COLLISION) &&
+ doc->magic == DOC_MAGIC) {
int okay = 1;
if (!f.doc_from_ram_cache)
f.not_from_ram_cache = 1;
@@ -2151,7 +2145,7 @@ CacheVC::handleReadDone(int event, Event *e) {
int indx;
do {
indx = vol->interim_index++ % vol->num_interim_vols;
- }while (good_interim_disks > 0 && DISK_BAD(vol->interim_vols[indx].disk));
+ } while (good_interim_disks > 0 && DISK_BAD(vol->interim_vols[indx].disk));
if (good_interim_disks) {
if (f.write_into_interim) {
@@ -2259,10 +2253,8 @@ Ldone:
int
-CacheVC::handleRead(int event, Event *e)
+CacheVC::handleRead(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(event);
- NOWARN_UNUSED(e);
cancel_trigger();
f.doc_from_ram_cache = false;
@@ -2408,11 +2400,8 @@ Cache::lookup(Continuation *cont, CacheURL *url, CacheFragType type)
#endif
int
-CacheVC::removeEvent(int event, Event *e)
+CacheVC::removeEvent(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(e);
- NOWARN_UNUSED(event);
-
cancel_trigger();
set_io_not_in_progress();
{
@@ -2486,13 +2475,9 @@ Lfree:
}
Action *
-Cache::remove(Continuation *cont, CacheKey *key, CacheFragType type,
- bool user_agents, bool link,
- char *hostname, int host_len)
+Cache::remove(Continuation *cont, CacheKey *key, CacheFragType type, bool /* user_agents ATS_UNUSED */,
+ bool /* link ATS_UNUSED */, char *hostname, int host_len)
{
- NOWARN_UNUSED(user_agents);
- NOWARN_UNUSED(link);
-
if (!CACHE_READY(type)) {
if (cont)
cont->handleEvent(CACHE_EVENT_REMOVE_FAILED, 0);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/cache/CacheDir.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheDir.cc b/iocore/cache/CacheDir.cc
index eada3f6..055e7fd 100644
--- a/iocore/cache/CacheDir.cc
+++ b/iocore/cache/CacheDir.cc
@@ -102,11 +102,8 @@ OpenDir::open_write(CacheVC *cont, int allow_if_writers, int max_writers)
}
int
-OpenDir::signal_readers(int event, Event *e)
+OpenDir::signal_readers(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(e);
- NOWARN_UNUSED(event);
-
Queue<CacheVC, Link_CacheVC_opendir_link> newly_delayed_readers;
EThread *t = mutex->thread_holding;
CacheVC *c = NULL;
@@ -1089,9 +1086,6 @@ sync_cache_dir_on_shutdown(void)
int
CacheSync::mainEvent(int event, Event *e)
{
- NOWARN_UNUSED(e);
- NOWARN_UNUSED(event);
-
if (trigger) {
trigger->cancel_action();
trigger = NULL;
@@ -1220,9 +1214,8 @@ Ldone:
#define HIST_DEPTH 8
int
-Vol::dir_check(bool fix)
+Vol::dir_check(bool /* fix ATS_UNUSED */) // TODO: we should eliminate this parameter ?
{
- NOWARN_UNUSED(fix);
int hist[HIST_DEPTH + 1] = { 0 };
int *shist = (int*)ats_malloc(segments * sizeof(int));
memset(shist, 0, segments * sizeof(int));
@@ -1400,8 +1393,7 @@ dir_corrupt_bucket(Dir *b, int s, Vol *d)
dir_set_next(e, dir_to_offset(e, seg));
}
-EXCLUSIVE_REGRESSION_TEST(Cache_dir) (RegressionTest *t, int atype, int *status) {
- NOWARN_UNUSED(atype);
+EXCLUSIVE_REGRESSION_TEST(Cache_dir) (RegressionTest *t, int /* atype ATS_UNUSED */, int *status) {
ink_hrtime ttime;
int ret = REGRESSION_TEST_PASSED;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/cache/CacheDisk.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheDisk.cc b/iocore/cache/CacheDisk.cc
index cdda494..b61fec7 100644
--- a/iocore/cache/CacheDisk.cc
+++ b/iocore/cache/CacheDisk.cc
@@ -107,9 +107,8 @@ CacheDisk::clearDisk()
}
int
-CacheDisk::clearDone(int event, void *data)
+CacheDisk::clearDone(int event, void * /* data ATS_UNUSED */)
{
- NOWARN_UNUSED(data);
ink_assert(event == AIO_EVENT_DONE);
if ((size_t) io.aiocb.aio_nbytes != (size_t) io.aio_result) {
@@ -123,9 +122,8 @@ CacheDisk::clearDone(int event, void *data)
}
int
-CacheDisk::openStart(int event, void *data)
+CacheDisk::openStart(int event, void * /* data ATS_UNUSED */)
{
- NOWARN_UNUSED(data);
ink_assert(event == AIO_EVENT_DONE);
if ((size_t) io.aiocb.aio_nbytes != (size_t) io.aio_result) {
@@ -151,10 +149,8 @@ CacheDisk::openStart(int event, void *data)
}
int
-CacheDisk::openDone(int event, void *data)
+CacheDisk::openDone(int /* event ATS_UNUSED */, void * /* data ATS_UNUSED */)
{
- NOWARN_UNUSED(data);
- NOWARN_UNUSED(event);
if (cacheProcessor.start_done) {
SET_HANDLER(&CacheDisk::syncDone);
cacheProcessor.diskInitialized();
@@ -177,10 +173,8 @@ CacheDisk::sync()
}
int
-CacheDisk::syncDone(int event, void *data)
+CacheDisk::syncDone(int event, void * /* data ATS_UNUSED */)
{
- NOWARN_UNUSED(data);
-
ink_assert(event == AIO_EVENT_DONE);
if ((size_t) io.aiocb.aio_nbytes != (size_t) io.aio_result) {
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/cache/CacheHosting.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheHosting.cc b/iocore/cache/CacheHosting.cc
index bcaa49d..e139858 100644
--- a/iocore/cache/CacheHosting.cc
+++ b/iocore/cache/CacheHosting.cc
@@ -247,11 +247,9 @@ CacheHostTable::Match(char *rdata, int rlen, CacheHostResult * result)
}
int
-CacheHostTable::config_callback(const char *name, RecDataT data_type, RecData data, void *cookie)
+CacheHostTable::config_callback(const char * /* name ATS_UNUSED */, RecDataT /* data_type ATS_UNUSED */,
+ RecData /* data ATS_UNUSED */, void *cookie)
{
- NOWARN_UNUSED(name);
- NOWARN_UNUSED(data);
- NOWARN_UNUSED(data_type);
CacheHostTable **ppt = (CacheHostTable **) cookie;
eventProcessor.schedule_imm(NEW(new CacheHostTableConfig(ppt)));
return 0;
@@ -618,9 +616,8 @@ CacheHostRecord::Init(matcher_line * line_info, CacheType typ)
}
void
-CacheHostRecord::UpdateMatch(CacheHostResult * r, char *rd)
+CacheHostRecord::UpdateMatch(CacheHostResult * r, char * /* rd ATS_UNUSED */)
{
- NOWARN_UNUSED(rd);
r->record = this;
}
@@ -903,8 +900,7 @@ int execute_and_verify(RegressionTest * t);
void save_state();
void restore_state();
-EXCLUSIVE_REGRESSION_TEST(Cache_vol) (RegressionTest * t, int atype, int *status) {
- NOWARN_UNUSED(atype);
+EXCLUSIVE_REGRESSION_TEST(Cache_vol) (RegressionTest * t, int /* atype ATS_UNUSED */, int *status) {
save_state();
srand48(time(NULL));
*status = REGRESSION_TEST_PASSED;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/cache/CacheLink.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheLink.cc b/iocore/cache/CacheLink.cc
index 37c6c8c..9766d64 100644
--- a/iocore/cache/CacheLink.cc
+++ b/iocore/cache/CacheLink.cc
@@ -56,10 +56,8 @@ Cache::link(Continuation * cont, CacheKey * from, CacheKey * to, CacheFragType t
}
int
-CacheVC::linkWrite(int event, Event * e)
+CacheVC::linkWrite(int event, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(e);
- NOWARN_UNUSED(event);
ink_assert(event == AIO_EVENT_DONE);
set_io_not_in_progress();
dir_insert(&first_key, vol, &dir);
@@ -122,10 +120,8 @@ Lcallreturn:
}
int
-CacheVC::derefRead(int event, Event * e)
+CacheVC::derefRead(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(e);
- NOWARN_UNUSED(event);
Doc *doc = NULL;
cancel_trigger();
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/cache/CacheRead.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheRead.cc b/iocore/cache/CacheRead.cc
index 97e51e0..3c97305 100644
--- a/iocore/cache/CacheRead.cc
+++ b/iocore/cache/CacheRead.cc
@@ -170,11 +170,8 @@ CacheVC::openReadFromWriterFailure(int event, Event * e)
}
int
-CacheVC::openReadChooseWriter(int event, Event * e)
+CacheVC::openReadChooseWriter(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(e);
- NOWARN_UNUSED(event);
-
intptr_t err = ECACHE_DOC_BUSY;
CacheVC *w = NULL;
@@ -458,11 +455,8 @@ CacheVC::openReadFromWriter(int event, Event * e)
}
int
-CacheVC::openReadFromWriterMain(int event, Event * e)
+CacheVC::openReadFromWriterMain(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(e);
- NOWARN_UNUSED(event);
-
cancel_trigger();
if (seek_to) {
vio.ndone = seek_to;
@@ -505,11 +499,8 @@ CacheVC::openReadFromWriterMain(int event, Event * e)
}
int
-CacheVC::openReadClose(int event, Event * e)
+CacheVC::openReadClose(int event, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(e);
- NOWARN_UNUSED(event);
-
cancel_trigger();
if (is_io_in_progress()) {
if (event != AIO_EVENT_DONE)
@@ -631,11 +622,8 @@ LreadMain:
}
int
-CacheVC::openReadMain(int event, Event * e)
+CacheVC::openReadMain(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(e);
- NOWARN_UNUSED(event);
-
cancel_trigger();
Doc *doc = (Doc *) buf->data();
int64_t ntodo = vio.ntodo();
@@ -798,11 +786,8 @@ Lcallreturn:
if you change this you might have to change that.
*/
int
-CacheVC::openReadStartEarliest(int event, Event * e)
+CacheVC::openReadStartEarliest(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(e);
- NOWARN_UNUSED(event);
-
int ret = 0;
Doc *doc = NULL;
cancel_trigger();
@@ -961,11 +946,8 @@ Lsuccess:
// the volume lock has been taken when this function is called
#ifdef HTTP_CACHE
int
-CacheVC::openReadVecWrite(int event, Event * e)
+CacheVC::openReadVecWrite(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(e);
- NOWARN_UNUSED(event);
-
cancel_trigger();
set_io_not_in_progress();
ink_assert(od);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/cache/CacheTest.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheTest.cc b/iocore/cache/CacheTest.cc
index 0650242..ecc1a72 100644
--- a/iocore/cache/CacheTest.cc
+++ b/iocore/cache/CacheTest.cc
@@ -275,8 +275,7 @@ CacheTestSM::CacheTestSM(const CacheTestSM &ao) : RegressionSM(ao) {
SET_HANDLER(&CacheTestSM::event_handler);
}
-EXCLUSIVE_REGRESSION_TEST(cache)(RegressionTest *t, int atype, int *pstatus) {
- NOWARN_UNUSED(atype);
+EXCLUSIVE_REGRESSION_TEST(cache)(RegressionTest *t, int /* atype ATS_UNUSED */, int *pstatus) {
if (cacheProcessor.IsCacheEnabled() != CACHE_INITIALIZED) {
rprintf(t, "cache not initialized");
*pstatus = REGRESSION_TEST_FAILED;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/cache/CacheVol.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheVol.cc b/iocore/cache/CacheVol.cc
index bb4b387..8ce0361 100644
--- a/iocore/cache/CacheVol.cc
+++ b/iocore/cache/CacheVol.cc
@@ -53,11 +53,8 @@ Cache::scan(Continuation * cont, char *hostname, int host_len, int KB_per_second
}
int
-CacheVC::scanVol(int event, Event * e)
+CacheVC::scanVol(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(e);
- NOWARN_UNUSED(event);
-
Debug("cache_scan_truss", "inside %p:scanVol", this);
if (_action.cancelled)
return free_CacheVC(this);
@@ -151,11 +148,8 @@ static char *make_vol_map(Vol *d)
}
int
-CacheVC::scanObject(int event, Event * e)
+CacheVC::scanObject(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(e);
- NOWARN_UNUSED(event);
-
Debug("cache_scan_truss", "inside %p:scanObject", this);
Doc *doc = NULL;
@@ -378,11 +372,8 @@ Lcancel:
}
int
-CacheVC::scanRemoveDone(int event, Event * e)
+CacheVC::scanRemoveDone(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(e);
- NOWARN_UNUSED(event);
-
Debug("cache_scan_truss", "inside %p:scanRemoveDone", this);
Debug("cache_scan", "remove done.");
#ifdef HTTP_CACHE
@@ -393,10 +384,8 @@ CacheVC::scanRemoveDone(int event, Event * e)
}
int
-CacheVC::scanOpenWrite(int event, Event * e)
+CacheVC::scanOpenWrite(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(e);
- NOWARN_UNUSED(event);
Debug("cache_scan_truss", "inside %p:scanOpenWrite", this);
cancel_trigger();
// get volume lock
@@ -482,10 +471,8 @@ CacheVC::scanOpenWrite(int event, Event * e)
}
int
-CacheVC::scanUpdateDone(int event, Event * e)
+CacheVC::scanUpdateDone(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(e);
- NOWARN_UNUSED(event);
Debug("cache_scan_truss", "inside %p:scanUpdateDone", this);
cancel_trigger();
// get volume lock
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/cache/CacheWrite.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheWrite.cc b/iocore/cache/CacheWrite.cc
index c77cc3f..de0b5ad 100644
--- a/iocore/cache/CacheWrite.cc
+++ b/iocore/cache/CacheWrite.cc
@@ -1811,9 +1811,6 @@ Lcallreturn:
int
InterimCacheVol::aggWrite(int event, void *e)
{
- NOWARN_UNUSED(event);
- NOWARN_UNUSED(e);
-
ink_assert(!is_io_in_progress());
MigrateToInterimCache *mts;
Doc *doc;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/cache/P_CacheInternal.h
----------------------------------------------------------------------
diff --git a/iocore/cache/P_CacheInternal.h b/iocore/cache/P_CacheInternal.h
index 576c361..a1e2b60 100644
--- a/iocore/cache/P_CacheInternal.h
+++ b/iocore/cache/P_CacheInternal.h
@@ -756,9 +756,8 @@ CacheVC::die()
}
TS_INLINE int
-CacheVC::handleWriteLock(int event, Event *e)
+CacheVC::handleWriteLock(int /* event ATS_UNUSED */, Event *e)
{
- NOWARN_UNUSED(event);
cancel_trigger();
int ret = 0;
{
@@ -1090,9 +1089,8 @@ Cache::open_read(Continuation *cont, CacheURL *url, CacheHTTPHdr *request,
}
TS_INLINE void
-Cache::generate_key(INK_MD5 *md5, URL *url, CacheHTTPHdr *request)
+Cache::generate_key(INK_MD5 *md5, URL *url, CacheHTTPHdr */* request ATS_UNUSED */)
{
- NOWARN_UNUSED(request);
#ifdef BROKEN_HACK_FOR_VARY_ON_UA
// We probably should make this configurable, both enabling it and what
// MIME types we want to treat differently. // Leif
@@ -1236,7 +1234,7 @@ CacheProcessor::open_write_buffer(Continuation *cont, MIOBuffer *buf, CacheKey *
CacheFragType frag_type, int options, time_t pin_in_cache,
char *hostname, int host_len)
{
- NOWARN_UNUSED(pin_in_cache);
+ (void)pin_in_cache;
(void)cont;
(void)buf;
(void)key;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/cache/RamCacheCLFUS.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/RamCacheCLFUS.cc b/iocore/cache/RamCacheCLFUS.cc
index 4c06551..6f290f0 100644
--- a/iocore/cache/RamCacheCLFUS.cc
+++ b/iocore/cache/RamCacheCLFUS.cc
@@ -107,7 +107,9 @@ static const int bucket_sizes[] = {
134217689, 268435399, 536870909, 1073741789, 2147483647
};
-void RamCacheCLFUS::resize_hashtable() {
+void
+RamCacheCLFUS::resize_hashtable()
+{
int anbuckets = bucket_sizes[ibuckets];
DDebug("ram_cache", "resize hashtable %d", anbuckets);
int64_t s = anbuckets * sizeof(DList(RamCacheCLFUSEntry, hash_link));
@@ -131,7 +133,9 @@ void RamCacheCLFUS::resize_hashtable() {
}
}
-void RamCacheCLFUS::init(int64_t abytes, Vol *avol) {
+void
+RamCacheCLFUS::init(int64_t abytes, Vol *avol)
+{
vol = avol;
max_bytes = abytes;
DDebug("ram_cache", "initializing ram_cache %" PRId64 " bytes", abytes);
@@ -141,7 +145,8 @@ void RamCacheCLFUS::init(int64_t abytes, Vol *avol) {
}
#ifdef CHECK_ACOUNTING
-static void check_accounting(RamCacheCLFUS *c) {
+static void check_accounting(RamCacheCLFUS *c)
+{
int64_t x = 0, xsize = 0, h = 0;
RamCacheCLFUSEntry *y = c->lru[0].head;
while (y) { x++; xsize += y->size + ENTRY_OVERHEAD; y = y->lru_link.next; }
@@ -155,7 +160,9 @@ static void check_accounting(RamCacheCLFUS *c) {
#define check_accounting(_c)
#endif
-int RamCacheCLFUS::get(INK_MD5 *key, Ptr<IOBufferData> *ret_data, uint32_t auxkey1, uint32_t auxkey2) {
+int
+RamCacheCLFUS::get(INK_MD5 *key, Ptr<IOBufferData> *ret_data, uint32_t auxkey1, uint32_t auxkey2)
+{
if (!max_bytes)
return 0;
int64_t i = key->word(3) % nbuckets;
@@ -262,7 +269,9 @@ Lfree:
THREAD_FREE(e, ramCacheCLFUSEntryAllocator, this_ethread());
}
-void RamCacheCLFUS::victimize(RamCacheCLFUSEntry *e) {
+void
+RamCacheCLFUS::victimize(RamCacheCLFUSEntry *e)
+{
objects--;
DDebug("ram_cache", "put %X %d %d size %d VICTIMIZED", e->key.word(3), e->auxkey1, e->auxkey2, e->size);
e->data = NULL;
@@ -271,7 +280,9 @@ void RamCacheCLFUS::victimize(RamCacheCLFUSEntry *e) {
history++;
}
-void RamCacheCLFUS::move_compressed(RamCacheCLFUSEntry *e) {
+void
+RamCacheCLFUS::move_compressed(RamCacheCLFUSEntry *e)
+{
if (e == compressed) {
if (compressed->lru_link.next)
compressed = compressed->lru_link.next;
@@ -282,7 +293,9 @@ void RamCacheCLFUS::move_compressed(RamCacheCLFUSEntry *e) {
}
}
-RamCacheCLFUSEntry *RamCacheCLFUS::destroy(RamCacheCLFUSEntry *e) {
+RamCacheCLFUSEntry *
+RamCacheCLFUS::destroy(RamCacheCLFUSEntry *e)
+{
RamCacheCLFUSEntry *ret = e->hash_link.next;
move_compressed(e);
lru[e->flag_bits.lru].remove(e);
@@ -300,7 +313,9 @@ RamCacheCLFUSEntry *RamCacheCLFUS::destroy(RamCacheCLFUSEntry *e) {
return ret;
}
-void RamCacheCLFUS::compress_entries(EThread *thread, int do_at_most) {
+void
+RamCacheCLFUS::compress_entries(EThread *thread, int do_at_most)
+{
if (!cache_config_ram_cache_compress)
return;
MUTEX_TAKE_LOCK(vol->mutex, thread);
@@ -429,7 +444,9 @@ void RamCacheCLFUS::compress_entries(EThread *thread, int do_at_most) {
return;
}
-void RamCacheCLFUS::requeue_victims(RamCacheCLFUS *c, Que(RamCacheCLFUSEntry, lru_link) &victims) {
+void
+RamCacheCLFUS::requeue_victims(RamCacheCLFUS *c, Que(RamCacheCLFUSEntry, lru_link) &victims)
+{
RamCacheCLFUSEntry *victim = 0;
while ((victim = victims.dequeue())) {
c->bytes += victim->size + ENTRY_OVERHEAD;
@@ -439,7 +456,9 @@ void RamCacheCLFUS::requeue_victims(RamCacheCLFUS *c, Que(RamCacheCLFUSEntry, lr
}
}
-int RamCacheCLFUS::put(INK_MD5 *key, IOBufferData *data, uint32_t len, bool copy, uint32_t auxkey1, uint32_t auxkey2) {
+int
+RamCacheCLFUS::put(INK_MD5 *key, IOBufferData *data, uint32_t len, bool copy, uint32_t auxkey1, uint32_t auxkey2)
+{
if (!max_bytes)
return 0;
uint32_t i = key->word(3) % nbuckets;
@@ -595,7 +614,10 @@ Lhistory:
return 0;
}
-int RamCacheCLFUS::fixup(INK_MD5 * key, uint32_t old_auxkey1, uint32_t old_auxkey2, uint32_t new_auxkey1, uint32_t new_auxkey2) {
+int
+RamCacheCLFUS::fixup(INK_MD5 * key, uint32_t old_auxkey1, uint32_t old_auxkey2, uint32_t new_auxkey1,
+ uint32_t new_auxkey2)
+{
if (!max_bytes)
return 0;
uint32_t i = key->word(3) % nbuckets;
@@ -611,16 +633,21 @@ int RamCacheCLFUS::fixup(INK_MD5 * key, uint32_t old_auxkey1, uint32_t old_auxke
return 0;
}
-class RamCacheCLFUSCompressor : public Continuation { public:
+class RamCacheCLFUSCompressor : public Continuation {
+public:
RamCacheCLFUS *rc;
int mainEvent(int event, Event *e);
- RamCacheCLFUSCompressor(RamCacheCLFUS *arc): rc(arc) {
- SET_HANDLER(&RamCacheCLFUSCompressor::mainEvent);
+
+ RamCacheCLFUSCompressor(RamCacheCLFUS *arc)
+ : rc(arc)
+ {
+ SET_HANDLER(&RamCacheCLFUSCompressor::mainEvent);
}
};
-int RamCacheCLFUSCompressor::mainEvent(int event, Event *e) {
- NOWARN_UNUSED(event);
+int
+RamCacheCLFUSCompressor::mainEvent(int /* event ATS_UNUSED */, Event *e)
+{
switch (cache_config_ram_cache_compress) {
default:
Warning("unknown RAM cache compression type: %d", cache_config_ram_cache_compress);
@@ -643,7 +670,9 @@ int RamCacheCLFUSCompressor::mainEvent(int event, Event *e) {
return EVENT_CONT;
}
-RamCache *new_RamCacheCLFUS() {
+RamCache *
+new_RamCacheCLFUS()
+{
RamCacheCLFUS *r = new RamCacheCLFUS;
eventProcessor.schedule_every(new RamCacheCLFUSCompressor(r), HRTIME_SECOND, ET_TASK);
return r;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/cluster/ClusterAPI.cc
----------------------------------------------------------------------
diff --git a/iocore/cluster/ClusterAPI.cc b/iocore/cluster/ClusterAPI.cc
index 6609c62..fab80dc 100644
--- a/iocore/cluster/ClusterAPI.cc
+++ b/iocore/cluster/ClusterAPI.cc
@@ -118,10 +118,8 @@ private:
};
int
-MachineStatusSM::MachineStatusSMEvent(Event * e, void *d)
+MachineStatusSM::MachineStatusSMEvent(Event * /* e ATS_UNUSED */, void * /* d ATS_UNUSED */)
{
- NOWARN_UNUSED(e);
- NOWARN_UNUSED(d);
int n;
EThread *et = this_ethread();
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/cluster/ClusterCache.cc
----------------------------------------------------------------------
diff --git a/iocore/cluster/ClusterCache.cc b/iocore/cluster/ClusterCache.cc
index 2d6f011..4abcde8 100644
--- a/iocore/cluster/ClusterCache.cc
+++ b/iocore/cluster/ClusterCache.cc
@@ -310,9 +310,8 @@ ClusterVConnectionCache::lookup(INK_MD5 * key)
}
int
-ClusterVConnectionCacheEvent::eventHandler(int event, Event * e)
+ClusterVConnectionCacheEvent::eventHandler(int /* event ATS_UNUSED */, Event * e)
{
- NOWARN_UNUSED(event);
CLUSTER_INCREMENT_DYN_STAT(CLUSTER_VC_CACHE_SCANS_STAT);
MUTEX_TRY_LOCK(lock, cache->hash_lock[hash_index], this_ethread());
if (!lock) {
@@ -794,9 +793,8 @@ CacheContinuation::lookupOpenWriteVCEvent(int event, Event * e)
}
int
-CacheContinuation::remove_and_delete(int event, Event * e)
+CacheContinuation::remove_and_delete(int /* event ATS_UNUSED */, Event * e)
{
- NOWARN_UNUSED(event);
unsigned int hash = FOLDHASH(target_ip, seq_number);
MUTEX_TRY_LOCK(queuelock, remoteCacheContQueueMutex[hash], this_ethread());
if (queuelock) {
@@ -1851,9 +1849,8 @@ CacheContinuation::setupReadBufTunnel(VConnection * cache_read_vc, VConnection *
// Tunnnel exited event handler, used for readahead on open read.
///////////////////////////////////////////////////////////////////////
int
-CacheContinuation::tunnelClosedEvent(int event, void *c)
+CacheContinuation::tunnelClosedEvent(int /* event ATS_UNUSED */, void *c)
{
- NOWARN_UNUSED(event);
ink_assert(magicno == (int) MagicNo);
// Note: We are called with the tunnel_mutex held.
CacheContinuation *tc = (CacheContinuation *) c;
@@ -1937,9 +1934,8 @@ CacheContinuation::disposeOfDataBuffer(void *d)
}
int
-CacheContinuation::handleDisposeEvent(int event, CacheContinuation * cc)
+CacheContinuation::handleDisposeEvent(int /* event ATS_UNUSED */, CacheContinuation * cc)
{
- NOWARN_UNUSED(event);
ink_assert(cc->magicno == (int) MagicNo);
MUTEX_TRY_LOCK(lock, cc->tunnel_mutex, this_ethread());
if (lock) {
@@ -2474,9 +2470,8 @@ retry:
//////////////////////////////////////////////////////////////////////////
int
-CacheContinuation::probeLookupEvent(int event, void *d)
+CacheContinuation::probeLookupEvent(int event, void * /* d ATS_UNUSED */)
{
- NOWARN_UNUSED(d);
ink_assert(magicno == (int) MagicNo);
callback_user(event, 0);
return EVENT_DONE;
@@ -2487,10 +2482,8 @@ CacheContinuation::probeLookupEvent(int event, void *d)
// Result of a local lookup for PROBE_LOCAL_CACHE_FIRST
///////////////////////////////////////////////////////////
int
-CacheContinuation::lookupEvent(int event, void *d)
+CacheContinuation::lookupEvent(int /* event ATS_UNUSED */, void * /* d ATS_UNUSED */)
{
- NOWARN_UNUSED(event);
- NOWARN_UNUSED(d);
ink_release_assert(!"Invalid call CacheContinuation::lookupEvent");
return EVENT_DONE;
@@ -2680,9 +2673,8 @@ cache_lookup_ClusterFunction(ClusterHandler *ch, void *data, int len)
// It packages up the result and sends it back to the calling machine.
/////////////////////////////////////////////////////////////////////////
int
-CacheContinuation::replyLookupEvent(int event, void *d)
+CacheContinuation::replyLookupEvent(int event, void * /* d ATS_UNUSED */)
{
- NOWARN_UNUSED(d);
ink_hrtime now;
now = ink_get_hrtime();
CLUSTER_SUM_DYN_STAT(CLUSTER_CACHE_CALLBACK_TIME_STAT, now - start_time);
@@ -2778,10 +2770,8 @@ CacheContinuation::insert_cache_callback_user(ClusterVConnection * vc, int res,
}
int
-CacheContinuation::insertCallbackEvent(int event, Event * e)
+CacheContinuation::insertCallbackEvent(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(event);
- NOWARN_UNUSED(e);
if (GlobalOpenWriteVCcache->insert(&url_md5, (ClusterVConnection *)
callback_data_2)) {
// Inserted
@@ -2832,10 +2822,8 @@ CacheContinuation::defer_callback_result(int r, void *e)
}
int
-CacheContinuation::callbackResultEvent(int event, Event * e)
+CacheContinuation::callbackResultEvent(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(event);
- NOWARN_UNUSED(e);
if (!action.cancelled)
action.continuation->handleEvent(result, callback_data);
cacheContAllocator_free(this);
@@ -2910,10 +2898,8 @@ CacheContinuation::callback_failure(Action * a, int result, int err, CacheContin
// Invoke callback and deallocate continuation.
///////////////////////////////////////////////////////////////////////
int
-CacheContinuation::callbackEvent(int event, Event * e)
+CacheContinuation::callbackEvent(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(event);
- NOWARN_UNUSED(e);
if (!action.cancelled)
action.continuation->handleEvent(result, (void *)(intptr_t)result_error);
cacheContAllocator_free(this);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/cluster/ClusterConfig.cc
----------------------------------------------------------------------
diff --git a/iocore/cluster/ClusterConfig.cc b/iocore/cluster/ClusterConfig.cc
index c901a15..a541364 100644
--- a/iocore/cluster/ClusterConfig.cc
+++ b/iocore/cluster/ClusterConfig.cc
@@ -155,9 +155,8 @@ ClusterAccept::ClusterAcceptMachine(NetVConnection * NetVC)
}
static void
-make_cluster_connections(MachineList * l, MachineList * old)
+make_cluster_connections(MachineList * l)
{
- NOWARN_UNUSED(old);
//
// Connect to all new machines.
//
@@ -180,11 +179,9 @@ make_cluster_connections(MachineList * l, MachineList * old)
}
int
-machine_config_change(const char *name, RecDataT data_type, RecData data, void *cookie)
+machine_config_change(const char * /* name ATS_UNUSED */, RecDataT /* data_type ATS_UNUSED */, RecData data,
+ void *cookie)
{
- NOWARN_UNUSED(name);
- NOWARN_UNUSED(data);
- NOWARN_UNUSED(data_type);
// Handle changes to the cluster.config or machines.config
// file. cluster.config is the list of machines in the
// cluster proper ( in the cluster hash table ). machines.config
@@ -204,7 +201,7 @@ machine_config_change(const char *name, RecDataT data_type, RecData data, void *
case CLUSTER_CONFIG:
old = cluster_config;
cluster_config = l;
- make_cluster_connections(l, old);
+ make_cluster_connections(l);
break;
}
#else
@@ -212,7 +209,7 @@ machine_config_change(const char *name, RecDataT data_type, RecData data, void *
old = cluster_config;
machines_config = l;
cluster_config = l;
- make_cluster_connections(l, old);
+ make_cluster_connections(l);
#endif
if (old)
free_MachineList(old);
@@ -249,9 +246,8 @@ struct ConfigurationContinuation: public Continuation
ClusterConfiguration *prev;
int
- zombieEvent(int event, Event * e)
+ zombieEvent(int /* event ATS_UNUSED */, Event * e)
{
- NOWARN_UNUSED(event);
prev->link.next = NULL; // remove that next pointer
SET_HANDLER((CfgContHandler) & ConfigurationContinuation::dieEvent);
e->schedule_in(CLUSTER_CONFIGURATION_ZOMBIE);
@@ -360,42 +356,6 @@ configuration_remove_machine(ClusterConfiguration * c, ClusterMachine * m)
return cc;
}
-/*************************************************************************/
-// Exported functions
-/*************************************************************************/
-
-//
-// cluster_machine_depth_list()
-// Return a machine list based on the given hash which is ordered from
-// now to the past. Returned list contains no duplicates and depth_list[0]
-// entry (current configuration) is always valid. Entries following
-// depth_list[0] are considered online.
-// Returns 0 on Success else non-zero on error.
-//
-int
-cluster_machine_depth_list(unsigned int hash, ClusterMachine ** depth_list, int depth_list_size)
-{
- NOWARN_UNUSED(depth_list_size);
- int n = 0;
- ClusterConfiguration *cc = this_cluster()->current_configuration();
- ClusterMachine *m = cc->machine_hash(hash);
-
- depth_list[n++] = m;
- cc = cc->link.next;
-
- while (!cc && n < (CONFIGURATION_HISTORY_PROBE_DEPTH + 1)) {
- m = cc->machine_hash(hash);
-
- if (m->dead || machine_in_vector(m, depth_list, n)) {
- depth_list[n++] = (ClusterMachine *) 0; // duplicate or offline
- } else {
- depth_list[n++] = m; // unique valid online entry
- }
- cc = cc->link.next;
- }
- return 0; // Success
-}
-
//
// cluster_machine_at_depth()
// Find a machine at a particular depth into the past.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/cluster/ClusterHandler.cc
----------------------------------------------------------------------
diff --git a/iocore/cluster/ClusterHandler.cc b/iocore/cluster/ClusterHandler.cc
index 34eb29e..92f234b 100644
--- a/iocore/cluster/ClusterHandler.cc
+++ b/iocore/cluster/ClusterHandler.cc
@@ -2529,9 +2529,8 @@ ClusterHandler::mainClusterEvent(int event, Event * e)
}
int
-ClusterHandler::process_read(ink_hrtime now)
+ClusterHandler::process_read(ink_hrtime /* now ATS_UNUSED */)
{
- NOWARN_UNUSED(now);
#ifdef CLUSTER_STATS
_process_read_calls++;
#endif
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/cluster/ClusterHandlerBase.cc
----------------------------------------------------------------------
diff --git a/iocore/cluster/ClusterHandlerBase.cc b/iocore/cluster/ClusterHandlerBase.cc
index 525b803..6647354 100644
--- a/iocore/cluster/ClusterHandlerBase.cc
+++ b/iocore/cluster/ClusterHandlerBase.cc
@@ -56,10 +56,8 @@ ClusterCalloutContinuation::~ClusterCalloutContinuation()
}
int
-ClusterCalloutContinuation::CalloutHandler(int event, Event * e)
+ClusterCalloutContinuation::CalloutHandler(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(event);
- NOWARN_UNUSED(e);
return _ch->process_incoming_callouts(this->mutex);
}
@@ -788,9 +786,8 @@ ClusterHandler::machine_down()
}
int
-ClusterHandler::zombify(Event * e)
+ClusterHandler::zombify(Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(e);
//
// Node associated with *this is declared down, setup the event to cleanup
// and defer deletion of *this
@@ -1228,9 +1225,8 @@ failed:
}
int
-ClusterHandler::beginClusterEvent(int event, Event * e)
+ClusterHandler::beginClusterEvent(int /* event ATS_UNUSED */, Event * e)
{
- NOWARN_UNUSED(event);
// Establish the main periodic Cluster event
#ifdef CLUSTER_IMMEDIATE_NETIO
build_poll(false);
@@ -1254,9 +1250,8 @@ ClusterHandler::zombieClusterEvent(int event, Event * e)
}
int
-ClusterHandler::protoZombieEvent(int event, Event * e)
+ClusterHandler::protoZombieEvent(int /* event ATS_UNUSED */, Event * e)
{
- NOWARN_UNUSED(event);
//
// Node associated with *this is declared down.
// After cleanup is complete, setup handler to delete *this
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/cluster/ClusterLib.cc
----------------------------------------------------------------------
diff --git a/iocore/cluster/ClusterLib.cc b/iocore/cluster/ClusterLib.cc
index 4968971..94cb171 100644
--- a/iocore/cluster/ClusterLib.cc
+++ b/iocore/cluster/ClusterLib.cc
@@ -474,10 +474,8 @@ GlobalClusterPeriodicEvent::init()
}
int
-GlobalClusterPeriodicEvent::calloutEvent(Event * e, void *data)
+GlobalClusterPeriodicEvent::calloutEvent(Event * /* e ATS_UNUSED */, void * /* data ATS_UNUSED */)
{
- NOWARN_UNUSED(e);
- NOWARN_UNUSED(data);
if (time_trace) {
dump_time_buckets();
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/cluster/ClusterLoadMonitor.cc
----------------------------------------------------------------------
diff --git a/iocore/cluster/ClusterLoadMonitor.cc b/iocore/cluster/ClusterLoadMonitor.cc
index 7da7b21..a3a267e 100644
--- a/iocore/cluster/ClusterLoadMonitor.cc
+++ b/iocore/cluster/ClusterLoadMonitor.cc
@@ -286,11 +286,8 @@ ClusterLoadMonitor::send_cluster_load_msg(ink_hrtime current_time)
}
int
-ClusterLoadMonitor::cluster_load_periodic(int event, Event * e)
+ClusterLoadMonitor::cluster_load_periodic(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(event);
- NOWARN_UNUSED(e);
-
// Perform periodic cluster load computation actions.
if (cancel_periodic) {
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/cluster/ClusterProcessor.cc
----------------------------------------------------------------------
diff --git a/iocore/cluster/ClusterProcessor.cc b/iocore/cluster/ClusterProcessor.cc
index 7f2a173..5c7186c 100644
--- a/iocore/cluster/ClusterProcessor.cc
+++ b/iocore/cluster/ClusterProcessor.cc
@@ -198,10 +198,10 @@ ClusterProcessor::invoke_remote_data(ClusterHandler *ch, int cluster_fn,
return internal_invoke_remote(ch, cluster_fn, data, data_len, options, (void *) chdr);
}
+// TODO: Why pass in the length here if not used ?
void
-ClusterProcessor::free_remote_data(char *p, int l)
+ClusterProcessor::free_remote_data(char *p, int /* l ATS_UNUSED */)
{
- NOWARN_UNUSED(l);
char *d = p - sizeof(int32_t); // reset to ptr to function code
int data_hdr = ClusterControl::DATA_HDR;
@@ -735,7 +735,7 @@ ClusterProcessor::start()
REC_ReadConfigInteger(stacksize, "proxy.config.thread.default.stacksize");
ET_CLUSTER = eventProcessor.spawn_event_threads(num_of_cluster_threads, "ET_CLUSTER", stacksize);
for (int i = 0; i < eventProcessor.n_threads_for_type[ET_CLUSTER]; i++) {
- initialize_thread_for_net(eventProcessor.eventthread[ET_CLUSTER][i], i);
+ initialize_thread_for_net(eventProcessor.eventthread[ET_CLUSTER][i]);
}
REC_RegisterConfigUpdateFunc("proxy.config.cluster.cluster_configuration", machine_config_change, (void *) CLUSTER_CONFIG);
do_machine_config_change((void *) CLUSTER_CONFIG, "proxy.config.cluster.cluster_configuration");
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/cluster/ClusterRPC.cc
----------------------------------------------------------------------
diff --git a/iocore/cluster/ClusterRPC.cc b/iocore/cluster/ClusterRPC.cc
index 9aa132a..6604485 100644
--- a/iocore/cluster/ClusterRPC.cc
+++ b/iocore/cluster/ClusterRPC.cc
@@ -230,9 +230,8 @@ set_channel_data_ClusterFunction(ClusterHandler *ch, void *tdata, int tlen)
}
void
-post_setchan_send_ClusterFunction(ClusterHandler *ch, void *data, int len)
+post_setchan_send_ClusterFunction(ClusterHandler *ch, void *data, int /* len ATS_UNUSED */)
{
- NOWARN_UNUSED(len);
EThread *thread = this_ethread();
ProxyMutex *mutex = thread->mutex;
// We are called on the ET_CLUSTER thread.
@@ -257,9 +256,8 @@ post_setchan_send_ClusterFunction(ClusterHandler *ch, void *data, int len)
}
void
-set_channel_pin_ClusterFunction(ClusterHandler *ch, void *data, int len)
+set_channel_pin_ClusterFunction(ClusterHandler *ch, void *data, int /* len ATS_UNUSED */)
{
- NOWARN_UNUSED(len);
// This isn't used. /leif
//EThread *thread = this_ethread();
//ProxyMutex *mutex = thread->mutex;
@@ -292,9 +290,8 @@ set_channel_pin_ClusterFunction(ClusterHandler *ch, void *data, int len)
}
void
-post_setchan_pin_ClusterFunction(ClusterHandler *ch, void *data, int len)
+post_setchan_pin_ClusterFunction(ClusterHandler *ch, void *data, int /* len ATS_UNUSED */)
{
- NOWARN_UNUSED(len);
EThread *thread = this_ethread();
ProxyMutex *mutex = thread->mutex;
// We are called on the ET_CLUSTER thread.
@@ -319,9 +316,8 @@ post_setchan_pin_ClusterFunction(ClusterHandler *ch, void *data, int len)
}
void
-set_channel_priority_ClusterFunction(ClusterHandler *ch, void *data, int len)
+set_channel_priority_ClusterFunction(ClusterHandler *ch, void *data, int /* len ATS_UNUSED */)
{
- NOWARN_UNUSED(len);
// This isn't used.
//EThread *thread = this_ethread();
//ProxyMutex *mutex = thread->mutex;
@@ -353,9 +349,8 @@ set_channel_priority_ClusterFunction(ClusterHandler *ch, void *data, int len)
}
void
-post_setchan_priority_ClusterFunction(ClusterHandler *ch, void *data, int len)
+post_setchan_priority_ClusterFunction(ClusterHandler *ch, void *data, int /* len ATS_UNUSED */)
{
- NOWARN_UNUSED(len);
EThread *thread = this_ethread();
ProxyMutex *mutex = thread->mutex;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/cluster/ClusterVConnection.cc
----------------------------------------------------------------------
diff --git a/iocore/cluster/ClusterVConnection.cc b/iocore/cluster/ClusterVConnection.cc
index 0a80e02..31e8e3e 100644
--- a/iocore/cluster/ClusterVConnection.cc
+++ b/iocore/cluster/ClusterVConnection.cc
@@ -87,39 +87,29 @@ ClusterVConnectionBase::do_io_read(Continuation * acont, int64_t anbytes, MIOBuf
}
VIO *
-ClusterVConnectionBase::do_io_pread(Continuation * acont, int64_t anbytes, MIOBuffer * abuffer, int64_t off)
+ClusterVConnectionBase::do_io_pread(Continuation * /* acont ATS_UNUSED */, int64_t /* anbytes ATS_UNUSED */,
+ MIOBuffer * /* abuffer ATS_UNUSED */, int64_t /* off ATS_UNUSED */)
{
- NOWARN_UNUSED(acont);
- NOWARN_UNUSED(anbytes);
- NOWARN_UNUSED(abuffer);
- NOWARN_UNUSED(off);
- ink_assert(!"implemented");
return 0;
}
int
-ClusterVConnection::get_header(void **ptr, int *len)
+ClusterVConnection::get_header(void ** /* ptr ATS_UNUSED */, int * /*len ATS_UNUSED */)
{
- NOWARN_UNUSED(ptr);
- NOWARN_UNUSED(len);
ink_assert(!"implemented");
return -1;
}
int
-ClusterVConnection::set_header(void *ptr, int len)
+ClusterVConnection::set_header(void * /* ptr ATS_UNUSED */, int /* len ATS_UNUSED */)
{
- NOWARN_UNUSED(ptr);
- NOWARN_UNUSED(len);
ink_assert(!"implemented");
return -1;
}
int
-ClusterVConnection::get_single_data(void **ptr, int *len)
+ClusterVConnection::get_single_data(void ** /* ptr ATS_UNUSED */, int * /* len ATS_UNUSED */)
{
- NOWARN_UNUSED(ptr);
- NOWARN_UNUSED(len);
ink_assert(!"implemented");
return -1;
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/cluster/P_ClusterCache.h
----------------------------------------------------------------------
diff --git a/iocore/cluster/P_ClusterCache.h b/iocore/cluster/P_ClusterCache.h
index f885689..7adb431 100644
--- a/iocore/cluster/P_ClusterCache.h
+++ b/iocore/cluster/P_ClusterCache.h
@@ -188,17 +188,6 @@ machine_in_vector(ClusterMachine * m, ClusterMachine ** mm, int len)
}
//
-// Return a machine list based on the given hash which is ordered from
-// now to the past. Returned list contains no duplicates and depth_list[0]
-// entry (current configuration) is always valid. Entries following
-// depth_list[0] are considered online.
-// Returns 0 on Success else non-zero on error.
-//
-int
-cluster_machine_depth_list(unsigned int hash, ClusterMachine ** depth_list,
- int depth_list_size = (CONFIGURATION_HISTORY_PROBE_DEPTH + 1));
-
-//
// Returns either a machine or NULL.
// Finds a machine starting at probe_depth going up to
// CONFIGURATION_HISTORY_PROBE_DEPTH
@@ -770,24 +759,18 @@ ClusterFunctionDescriptor clusterFunction[]
{false, true, CMSG_LOW_PRI, ping_reply_ClusterFunction, 0},
{false, true, CMSG_LOW_PRI, machine_list_ClusterFunction, 0},
{false, true, CMSG_LOW_PRI, close_channel_ClusterFunction, 0},
- {false, false, CMSG_LOW_PRI,
- get_hostinfo_ClusterFunction, 0}, // in HostDB.cc
- {false, false, CMSG_LOW_PRI,
- put_hostinfo_ClusterFunction, 0}, // in HostDB.cc
- {false, true, CMSG_LOW_PRI,
- cache_lookup_ClusterFunction, 0}, // in CacheCont.cc
+ {false, false, CMSG_LOW_PRI, get_hostinfo_ClusterFunction, 0}, // in HostDB.cc
+ {false, false, CMSG_LOW_PRI, put_hostinfo_ClusterFunction, 0}, // in HostDB.cc
+ {false, true, CMSG_LOW_PRI, cache_lookup_ClusterFunction, 0}, // in CacheCont.cc
{true, true, CMSG_LOW_PRI, cache_op_malloc_ClusterFunction, 0},
{false, true, CMSG_LOW_PRI, cache_op_ClusterFunction, 0},
{false, false, CMSG_LOW_PRI, cache_op_result_ClusterFunction, 0},
{false, false, CMSG_LOW_PRI, 0, 0}, // OBSOLETE
{false, false, CMSG_LOW_PRI, 0, 0}, // OBSOLETE
{false, false, CMSG_LOW_PRI, 0, 0}, // OBSOLETE
- {false, true, CMSG_MAX_PRI, set_channel_data_ClusterFunction,
- post_setchan_send_ClusterFunction},
- {false, true, CMSG_MAX_PRI, set_channel_pin_ClusterFunction,
- post_setchan_pin_ClusterFunction},
- {false, true, CMSG_MAX_PRI, set_channel_priority_ClusterFunction,
- post_setchan_priority_ClusterFunction},
+ {false, true, CMSG_MAX_PRI, set_channel_data_ClusterFunction, post_setchan_send_ClusterFunction},
+ {false, true, CMSG_MAX_PRI, set_channel_pin_ClusterFunction, post_setchan_pin_ClusterFunction},
+ {false, true, CMSG_MAX_PRI, set_channel_priority_ClusterFunction, post_setchan_priority_ClusterFunction},
/********************************************
* RESERVED for future cluster internal use *
********************************************/
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/dns/DNS.cc
----------------------------------------------------------------------
diff --git a/iocore/dns/DNS.cc b/iocore/dns/DNS.cc
index 5313896..7dec6a5 100644
--- a/iocore/dns/DNS.cc
+++ b/iocore/dns/DNS.cc
@@ -185,7 +185,7 @@ DNSProcessor::start(int, size_t stacksize) {
if (dns_thread > 0) {
// TODO: Hmmm, should we just get a single thread some other way?
ET_DNS = eventProcessor.spawn_event_threads(1, "ET_DNS", stacksize);
- initialize_thread_for_net(eventProcessor.eventthread[ET_DNS][0], 0);
+ initialize_thread_for_net(eventProcessor.eventthread[ET_DNS][0]);
} else {
// Initialize the first event thread for DNS.
ET_DNS = ET_CALL;
@@ -473,9 +473,8 @@ DNSHandler::validate_ip() {
*/
int
-DNSHandler::startEvent(int event, Event *e)
+DNSHandler::startEvent(int /* event ATS_UNUSED */, Event *e)
{
- NOWARN_UNUSED(event);
//
// If this is for the default server, get it
Debug("dns", "DNSHandler::startEvent: on thread %d\n", e->ethread->id);
@@ -525,9 +524,8 @@ DNSHandler::startEvent(int event, Event *e)
hander to a new nameserver.
*/
int
-DNSHandler::startEvent_sdns(int event, Event *e)
+DNSHandler::startEvent_sdns(int /* event ATS_UNUSED */, Event *e)
{
- NOWARN_UNUSED(event);
Debug("dns", "DNSHandler::startEvent_sdns: on thread %d\n", e->ethread->id);
this->validate_ip();
@@ -728,10 +726,8 @@ good_rcode(char *buff) {
void
-DNSHandler::recv_dns(int event, Event *e)
+DNSHandler::recv_dns(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(event);
- NOWARN_UNUSED(e);
DNSConnection *dnsc = NULL;
ip_text_buffer ipbuff1, ipbuff2;
@@ -1275,10 +1271,8 @@ DNSEntry::post(DNSHandler *h, HostEnt *ent)
}
int
-DNSEntry::postEvent(int event, Event *e)
+DNSEntry::postEvent(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(event);
- NOWARN_UNUSED(e);
if (!action.cancelled) {
Debug("dns", "called back continuation for %s", qname);
action.continuation->handleEvent(DNS_EVENT_LOOKUP, result_ent);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/dns/SplitDNS.cc
----------------------------------------------------------------------
diff --git a/iocore/dns/SplitDNS.cc b/iocore/dns/SplitDNS.cc
index 3fb7081..fde76a4 100644
--- a/iocore/dns/SplitDNS.cc
+++ b/iocore/dns/SplitDNS.cc
@@ -556,9 +556,8 @@ SplitDNSRecord::Init(matcher_line * line_info)
SplitDNSRecord::UpdateMatch()
-------------------------------------------------------------- */
void
-SplitDNSRecord::UpdateMatch(SplitDNSResult * result, RD * rdata)
+SplitDNSRecord::UpdateMatch(SplitDNSResult * result, RD * /* rdata ATS_UNUSED */)
{
- NOWARN_UNUSED(rdata);
int last_number = result->m_line_number;
if ((last_number<0) || (last_number> this->line_num)) {
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/eventsystem/P_UnixSocketManager.h
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/P_UnixSocketManager.h b/iocore/eventsystem/P_UnixSocketManager.h
index 498d468..e1976eb 100644
--- a/iocore/eventsystem/P_UnixSocketManager.h
+++ b/iocore/eventsystem/P_UnixSocketManager.h
@@ -87,9 +87,8 @@ SocketManager::open(const char *path, int oflag, mode_t mode)
}
TS_INLINE int64_t
-SocketManager::read(int fd, void *buf, int size, void *pOLP)
+SocketManager::read(int fd, void *buf, int size, void * /* pOLP ATS_UNUSED */)
{
- NOWARN_UNUSED(pOLP);
int64_t r;
do {
r =::read(fd, buf, size);
@@ -101,9 +100,8 @@ SocketManager::read(int fd, void *buf, int size, void *pOLP)
}
TS_INLINE int64_t
-SocketManager::pread(int fd, void *buf, int size, off_t offset, char *tag)
+SocketManager::pread(int fd, void *buf, int size, off_t offset, char * /* tag ATS_UNUSED */)
{
- NOWARN_UNUSED(tag);
int64_t r;
do {
r =::pread(fd, buf, size, offset);
@@ -127,9 +125,8 @@ SocketManager::readv(int fd, struct iovec *vector, size_t count)
}
TS_INLINE int64_t
-SocketManager::vector_io(int fd, struct iovec *vector, size_t count, int read_request, void *pOLP)
+SocketManager::vector_io(int fd, struct iovec *vector, size_t count, int read_request, void * /* pOLP ATS_UNUSED */)
{
- NOWARN_UNUSED(pOLP);
const int max_iovecs_per_request = 16;
int n;
int64_t r = 0;
@@ -199,9 +196,8 @@ SocketManager::recvfrom(int fd, void *buf, int size, int flags, struct sockaddr
}
TS_INLINE int64_t
-SocketManager::write(int fd, void *buf, int size, void *pOLP)
+SocketManager::write(int fd, void *buf, int size, void * /* pOLP ATS_UNUSED */)
{
- NOWARN_UNUSED(pOLP);
int64_t r;
do {
if (likely((r =::write(fd, buf, size)) >= 0))
@@ -212,9 +208,8 @@ SocketManager::write(int fd, void *buf, int size, void *pOLP)
}
TS_INLINE int64_t
-SocketManager::pwrite(int fd, void *buf, int size, off_t offset, char *tag)
+SocketManager::pwrite(int fd, void *buf, int size, off_t offset, char * /* tag ATS_UNUSED */)
{
- NOWARN_UNUSED(tag);
int64_t r;
do {
if (unlikely((r =::pwrite(fd, buf, size, offset)) < 0))
@@ -265,9 +260,8 @@ SocketManager::sendto(int fd, void *buf, int len, int flags, struct sockaddr con
}
TS_INLINE int
-SocketManager::sendmsg(int fd, struct msghdr *m, int flags, void *pOLP)
+SocketManager::sendmsg(int fd, struct msghdr *m, int flags, void * /* pOLP ATS_UNUSED */)
{
- NOWARN_UNUSED(pOLP);
int r;
do {
if (unlikely((r =::sendmsg(fd, m, flags)) < 0))
@@ -508,9 +502,8 @@ SocketManager::getsockname(int s, struct sockaddr *sa, socklen_t *sz)
}
TS_INLINE int
-SocketManager::socket(int domain, int type, int protocol, bool bNonBlocking)
+SocketManager::socket(int domain, int type, int protocol, bool /* bNonBlocking ATS_UNUSED */)
{
- NOWARN_UNUSED(bNonBlocking);
return::socket(domain, type, protocol);
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/eventsystem/Processor.cc
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/Processor.cc b/iocore/eventsystem/Processor.cc
index 56ab1a4..f46741e 100644
--- a/iocore/eventsystem/Processor.cc
+++ b/iocore/eventsystem/Processor.cc
@@ -72,9 +72,8 @@ Processor::~Processor()
//
//////////////////////////////////////////////////////////////////
Thread *
-Processor::create_thread(int thread_index)
+Processor::create_thread(int /* thread_index */)
{
- NOWARN_UNUSED(thread_index);
ink_release_assert(!"Processor::create_thread -- no default implementation");
return ((Thread *) 0);
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/hostdb/HostDB.cc
----------------------------------------------------------------------
diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc
index afeb961..f7cd00a 100644
--- a/iocore/hostdb/HostDB.cc
+++ b/iocore/hostdb/HostDB.cc
@@ -1113,10 +1113,8 @@ HostDBProcessor::setby_srv(const char *hostname, int len, const char *target, Ho
eventProcessor.schedule_imm(c);
}
int
-HostDBContinuation::setbyEvent(int event, Event * e)
+HostDBContinuation::setbyEvent(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(event);
- NOWARN_UNUSED(e);
HostDBInfo *r = probe(mutex, md5, false);
if (r)
@@ -1216,9 +1214,8 @@ HostDBProcessor::failed_connect_on_ip_for_name(Continuation * cont, sockaddr con
#endif
int
-HostDBContinuation::removeEvent(int event, Event * e)
+HostDBContinuation::removeEvent(int /* event ATS_UNUSED */, Event * e)
{
- NOWARN_UNUSED(event);
Continuation *cont = action.continuation;
MUTEX_TRY_LOCK(lock, cont ? (ProxyMutex *) cont->mutex : (ProxyMutex *) NULL, e->ethread);
@@ -1688,20 +1685,18 @@ HostDBContinuation::make_get_message(char *buf, int size)
//
// Make and send a get message
//
-bool HostDBContinuation::do_get_response(Event * e)
+bool HostDBContinuation::do_get_response(Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(e);
if (!hostdb_cluster)
return false;
// find an appropriate Machine
//
- ClusterMachine *
- m = NULL;
+ ClusterMachine *m = NULL;
- if (hostdb_migrate_on_demand)
+ if (hostdb_migrate_on_demand) {
m = cluster_machine_at_depth(master_hash(md5.hash), &probe_depth, past_probes);
- else {
+ } else {
if (probe_depth)
return false;
m = cluster_machine_at_depth(master_hash(md5.hash));
@@ -1713,11 +1708,10 @@ bool HostDBContinuation::do_get_response(Event * e)
// Make message
//
- HostDB_get_message
- msg;
+ HostDB_get_message msg;
+
memset(&msg, 0, sizeof(msg));
- int
- len = make_get_message((char *) &msg, sizeof(HostDB_get_message));
+ int len = make_get_message((char *) &msg, sizeof(HostDB_get_message));
// Setup this continuation, with a timeout
//
@@ -1810,9 +1804,8 @@ HostDBContinuation::do_put_response(ClusterMachine * m, HostDBInfo * r, Continua
// Probe state
//
int
-HostDBContinuation::probeEvent(int event, Event * e)
+HostDBContinuation::probeEvent(int /* event ATS_UNUSED */, Event * e)
{
- NOWARN_UNUSED(event);
ink_assert(!link.prev && !link.next);
EThread *t = e ? e->ethread : this_ethread();
@@ -1968,9 +1961,8 @@ HostDBContinuation::do_dns()
// Handle the response (put message)
//
int
-HostDBContinuation::clusterResponseEvent(int event, Event * e)
+HostDBContinuation::clusterResponseEvent(int/* event ATS_UNUSED */, Event * e)
{
- NOWARN_UNUSED(event);
if (from_cont) {
HostDBContinuation *c;
for (c = (HostDBContinuation *) remoteHostDBQueue[key_partition()].head; c; c = (HostDBContinuation *) c->link.next)
@@ -2084,9 +2076,8 @@ HostDBContinuation::failed_cluster_request(Event * e)
void
-get_hostinfo_ClusterFunction(ClusterHandler *ch, void *data, int len)
+get_hostinfo_ClusterFunction(ClusterHandler *ch, void *data, int /* len ATS_UNUSED */)
{
- NOWARN_UNUSED(len);
HostDBMD5 md5;
HostDB_get_message *msg = (HostDB_get_message *) data;
@@ -2131,9 +2122,8 @@ get_hostinfo_ClusterFunction(ClusterHandler *ch, void *data, int len)
void
-put_hostinfo_ClusterFunction(ClusterHandler *ch, void *data, int len)
+put_hostinfo_ClusterFunction(ClusterHandler *ch, void *data, int /* len ATS_UNUSED */)
{
- NOWARN_UNUSED(len);
HostDB_put_message *msg = (HostDB_put_message *) data;
HostDBContinuation *c = hostDBContAllocator.alloc();
HostDBContinuation::Options copt;
@@ -2165,18 +2155,15 @@ put_hostinfo_ClusterFunction(ClusterHandler *ch, void *data, int len)
// here, like move records to the current position in the cluster.
//
int
-HostDBContinuation::backgroundEvent(int event, Event * e)
+HostDBContinuation::backgroundEvent(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(event);
- NOWARN_UNUSED(e);
hostdb_current_interval++;
return EVENT_CONT;
}
-bool HostDBInfo::match(INK_MD5 & md5, int bucket, int buckets)
+bool HostDBInfo::match(INK_MD5 & md5, int /* bucket ATS_UNUSED */, int buckets)
{
- NOWARN_UNUSED(bucket);
if (md5[1] != md5_high)
return false;
@@ -2291,10 +2278,8 @@ struct ShowHostDB: public ShowCont
}
- int showLookup(int event, Event * e)
+ int showLookup(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(event);
- NOWARN_UNUSED(e);
SET_HANDLER(&ShowHostDB::showLookupDone);
if (name)
hostDBProcessor.getbyname_re(this, name, 0, HostDBProcessor::Options().setFlags(force ? HostDBProcessor::HOSTDB_FORCE_DNS_ALWAYS : 0));
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/net/P_UDPNet.h
----------------------------------------------------------------------
diff --git a/iocore/net/P_UDPNet.h b/iocore/net/P_UDPNet.h
index 608bc53..d159e1a 100644
--- a/iocore/net/P_UDPNet.h
+++ b/iocore/net/P_UDPNet.h
@@ -47,7 +47,7 @@ struct UDPNetHandler;
struct UDPNetProcessorInternal : public UDPNetProcessor
{
virtual int start(int n_udp_threads, size_t stacksize);
- void udp_read_from_net(UDPNetHandler * nh, UDPConnection * uc, PollDescriptor * pd, EThread * thread);
+ void udp_read_from_net(UDPNetHandler * nh, UDPConnection * uc);
int udp_callback(UDPNetHandler * nh, UDPConnection * uc, EThread * thread);
off_t pollCont_offset;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/net/P_UnixNet.h
----------------------------------------------------------------------
diff --git a/iocore/net/P_UnixNet.h b/iocore/net/P_UnixNet.h
index f8dfc95..5d52dce 100644
--- a/iocore/net/P_UnixNet.h
+++ b/iocore/net/P_UnixNet.h
@@ -199,7 +199,7 @@ public:
int startNetEvent(int event, Event * data);
int mainNetEvent(int event, Event * data);
int mainNetEventExt(int event, Event * data);
- void process_enabled_list(NetHandler *, EThread *);
+ void process_enabled_list(NetHandler *);
NetHandler();
};
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/net/P_UnixNetProcessor.h
----------------------------------------------------------------------
diff --git a/iocore/net/P_UnixNetProcessor.h b/iocore/net/P_UnixNetProcessor.h
index 5e08e0a..a0ac3c5 100644
--- a/iocore/net/P_UnixNetProcessor.h
+++ b/iocore/net/P_UnixNetProcessor.h
@@ -96,7 +96,7 @@ extern UnixNetProcessor unix_netProcessor;
// This function should be called for all threads created to
// accept such events by the EventProcesor.
//
-extern void initialize_thread_for_net(EThread * thread, int thread_index);
+extern void initialize_thread_for_net(EThread * thread);
//#include "UnixNet.h"
#endif
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/net/P_UnixNetVConnection.h
----------------------------------------------------------------------
diff --git a/iocore/net/P_UnixNetVConnection.h b/iocore/net/P_UnixNetVConnection.h
index 678ab20..cc434cd 100644
--- a/iocore/net/P_UnixNetVConnection.h
+++ b/iocore/net/P_UnixNetVConnection.h
@@ -108,9 +108,9 @@ public:
virtual Action *send_OOB(Continuation *cont, char *buf, int len);
virtual void cancel_OOB();
- virtual void setSSLHandshakeWantsRead(bool flag) { NOWARN_UNUSED(flag); return; }
+ virtual void setSSLHandshakeWantsRead(bool /* flag */) { return; }
virtual bool getSSLHandshakeWantsRead() { return false; }
- virtual void setSSLHandshakeWantsWrite(bool flag) { NOWARN_UNUSED(flag); return; }
+ virtual void setSSLHandshakeWantsWrite(bool /* flag */) { return; }
virtual bool getSSLHandshakeWantsWrite() { return false; }
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/net/SSLUtils.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc
index edcac1e..4568527 100644
--- a/iocore/net/SSLUtils.cc
+++ b/iocore/net/SSLUtils.cc
@@ -79,11 +79,8 @@ SSL_pthreads_thread_id()
}
static void
-SSL_locking_callback(int mode, int type, const char * file, int line)
+SSL_locking_callback(int mode, int type, const char * /* file ATS_UNUSED */, int /* line ATS_UNUSED */)
{
- NOWARN_UNUSED(file);
- NOWARN_UNUSED(line);
-
ink_assert(type < CRYPTO_num_locks());
if (mode & CRYPTO_LOCK) {
@@ -181,8 +178,8 @@ ssl_context_enable_sni(SSL_CTX * ctx, SSLCertLookup * lookup)
SSL_CTX_set_tlsext_servername_arg(ctx, lookup);
}
#else
- NOWARN_UNUSED(ctx);
- NOWARN_UNUSED(lookup);
+ (void)ctx;
+ (void)lookup;
#endif /* TS_USE_TLS_SNI */
return ctx;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/net/UnixNet.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixNet.cc b/iocore/net/UnixNet.cc
index 7ab79b3..b6e956b 100644
--- a/iocore/net/UnixNet.cc
+++ b/iocore/net/UnixNet.cc
@@ -185,10 +185,8 @@ net_signal_hook_function(EThread *thread) {
}
void
-initialize_thread_for_net(EThread *thread, int thread_index)
+initialize_thread_for_net(EThread *thread)
{
- NOWARN_UNUSED(thread_index);
-
new((ink_dummy_for_new *) get_NetHandler(thread)) NetHandler();
new((ink_dummy_for_new *) get_PollCont(thread)) PollCont(thread->mutex, get_NetHandler(thread));
get_NetHandler(thread)->mutex = new_ProxyMutex();
@@ -237,9 +235,8 @@ NetHandler::startNetEvent(int event, Event *e)
// Move VC's enabled on a different thread to the ready list
//
void
-NetHandler::process_enabled_list(NetHandler *nh, EThread *t)
+NetHandler::process_enabled_list(NetHandler *nh)
{
- NOWARN_UNUSED(t);
UnixNetVConnection *vc = NULL;
SListM(UnixNetVConnection, NetState, read, enable_link) rq(nh->read_enable_list.popall());
@@ -278,7 +275,7 @@ NetHandler::mainNetEvent(int event, Event *e)
NET_INCREMENT_DYN_STAT(net_handler_run_stat);
- process_enabled_list(this, e->ethread);
+ process_enabled_list(this);
if (likely(!read_ready_list.empty() || !write_ready_list.empty() || !read_enable_list.empty() || !write_enable_list.empty()))
poll_timeout = 0; // poll immediately returns -- we have triggered stuff to process right now
else
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/net/UnixNetProcessor.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixNetProcessor.cc b/iocore/net/UnixNetProcessor.cc
index a106c9a..090a549 100644
--- a/iocore/net/UnixNetProcessor.cc
+++ b/iocore/net/UnixNetProcessor.cc
@@ -271,12 +271,9 @@ UnixNetProcessor::connect_re_internal(
}
Action *
-UnixNetProcessor::connect(Continuation * cont,
- UnixNetVConnection ** avc,
- sockaddr const* target,
+UnixNetProcessor::connect(Continuation * cont, UnixNetVConnection ** /* avc */, sockaddr const* target,
NetVCOptions * opt)
{
- NOWARN_UNUSED(avc);
return connect_re(cont, target, opt);
}
@@ -413,7 +410,7 @@ UnixNetProcessor::start(int, size_t)
n_netthreads = eventProcessor.n_threads_for_type[etype];
netthreads = eventProcessor.eventthread[etype];
for (int i = 0; i < n_netthreads; ++i) {
- initialize_thread_for_net(netthreads[i], i);
+ initialize_thread_for_net(netthreads[i]);
#ifndef STANDALONE_IOCORE
extern void initialize_thread_for_http_sessions(EThread *thread, int thread_index);
initialize_thread_for_http_sessions(netthreads[i], i);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/iocore/net/UnixUDPNet.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixUDPNet.cc b/iocore/net/UnixUDPNet.cc
index c92f29b..0237e9c 100644
--- a/iocore/net/UnixUDPNet.cc
+++ b/iocore/net/UnixUDPNet.cc
@@ -105,11 +105,8 @@ UDPNetProcessorInternal::start(int n_upd_threads, size_t stacksize)
}
void
-UDPNetProcessorInternal::udp_read_from_net(UDPNetHandler * nh,
- UDPConnection * xuc, PollDescriptor * pd, EThread * thread)
+UDPNetProcessorInternal::udp_read_from_net(UDPNetHandler * nh, UDPConnection * xuc)
{
- NOWARN_UNUSED(pd);
- (void) thread;
UnixUDPConnection *uc = (UnixUDPConnection *) xuc;
// receive packet and queue onto UDPConnection.
@@ -847,7 +844,7 @@ UDPNetHandler::mainNetEvent(int event, Event * e)
// udp_polling->remove(uc,uc->polling_link);
uc->Release();
} else {
- udpNetInternal.udp_read_from_net(this, uc, pc->pollDescriptor, trigger_event->ethread);
+ udpNetInternal.udp_read_from_net(this, uc);
nread++;
}
} //if EPOLLIN
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/lib/records/P_RecUtils.h
----------------------------------------------------------------------
diff --git a/lib/records/P_RecUtils.h b/lib/records/P_RecUtils.h
index f8aecbe..e2410cd 100644
--- a/lib/records/P_RecUtils.h
+++ b/lib/records/P_RecUtils.h
@@ -43,7 +43,6 @@
(((rec_type) == RECT_CONFIG) || \
((rec_type) == RECT_LOCAL))
-#define REC_NOWARN_UNUSED(a) NOWARN_UNUSED(a)
//-------------------------------------------------------------------------
// RecData Utils
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/lib/records/RecCore.cc
----------------------------------------------------------------------
diff --git a/lib/records/RecCore.cc b/lib/records/RecCore.cc
index 5a09e0a..98c2566 100644
--- a/lib/records/RecCore.cc
+++ b/lib/records/RecCore.cc
@@ -85,8 +85,6 @@ register_record(RecT rec_type, const char *name, RecDataT data_type, RecData dat
static int
link_int(const char *name, RecDataT data_type, RecData data, void *cookie)
{
- REC_NOWARN_UNUSED(name);
- REC_NOWARN_UNUSED(data_type);
RecInt *rec_int = (RecInt *) cookie;
ink_atomic_swap(rec_int, data.rec_int);
return REC_ERR_OKAY;
@@ -95,8 +93,6 @@ link_int(const char *name, RecDataT data_type, RecData data, void *cookie)
static int
link_int32(const char *name, RecDataT data_type, RecData data, void *cookie)
{
- REC_NOWARN_UNUSED(name);
- REC_NOWARN_UNUSED(data_type);
*((int32_t *) cookie) = (int32_t) data.rec_int;
return REC_ERR_OKAY;
}
@@ -104,8 +100,6 @@ link_int32(const char *name, RecDataT data_type, RecData data, void *cookie)
static int
link_uint32(const char *name, RecDataT data_type, RecData data, void *cookie)
{
- REC_NOWARN_UNUSED(name);
- REC_NOWARN_UNUSED(data_type);
*((uint32_t *) cookie) = (uint32_t) data.rec_int;
return REC_ERR_OKAY;
}
@@ -113,8 +107,6 @@ link_uint32(const char *name, RecDataT data_type, RecData data, void *cookie)
static int
link_float(const char *name, RecDataT data_type, RecData data, void *cookie)
{
- REC_NOWARN_UNUSED(name);
- REC_NOWARN_UNUSED(data_type);
*((RecFloat *) cookie) = data.rec_float;
return REC_ERR_OKAY;
}
@@ -122,8 +114,6 @@ link_float(const char *name, RecDataT data_type, RecData data, void *cookie)
static int
link_counter(const char *name, RecDataT data_type, RecData data, void *cookie)
{
- REC_NOWARN_UNUSED(name);
- REC_NOWARN_UNUSED(data_type);
RecCounter *rec_counter = (RecCounter *) cookie;
ink_atomic_swap(rec_counter, data.rec_counter);
return REC_ERR_OKAY;
@@ -134,8 +124,6 @@ link_counter(const char *name, RecDataT data_type, RecData data, void *cookie)
static int
link_byte(const char *name, RecDataT data_type, RecData data, void *cookie)
{
- REC_NOWARN_UNUSED(name);
- REC_NOWARN_UNUSED(data_type);
RecByte *rec_byte = (RecByte *) cookie;
RecByte byte = static_cast<RecByte>(data.rec_int);
@@ -149,9 +137,6 @@ link_byte(const char *name, RecDataT data_type, RecData data, void *cookie)
static int
link_string_alloc(const char *name, RecDataT data_type, RecData data, void *cookie)
{
- REC_NOWARN_UNUSED(name);
- REC_NOWARN_UNUSED(data_type);
-
RecString _ss = data.rec_string;
RecString _new_value = NULL;
@@ -624,7 +609,6 @@ RecGetRecordCheckExpr(const char *name, char **check_expr, bool lock)
int
RecGetRecordDefaultDataString_Xmalloc(char *name, char **buf, bool lock)
{
- REC_NOWARN_UNUSED(lock);
int err;
RecRecord *r = NULL;
@@ -857,9 +841,6 @@ RecForceInsert(RecRecord * record)
static void
debug_record_callback(RecT rec_type, void *edata, int registered, const char *name, int data_type, RecData *datum)
{
- NOWARN_UNUSED(edata);
- NOWARN_UNUSED(rec_type);
-
switch(data_type) {
case RECD_INT:
RecDebug(DL_Note, " ([%d] '%s', '%" PRId64 "')", registered, name, datum->rec_int);
@@ -1083,10 +1064,8 @@ REC_readString(const char *name, bool * found, bool lock)
#include "LocalManager.h"
void
-RecSignalManager(int id, const char *msg)
+RecSignalManager(int /* id ATS_UNUSED */, const char */* msg ATS_UNUSED */)
{
- REC_NOWARN_UNUSED(id);
- REC_NOWARN_UNUSED(msg);
}
int
@@ -1117,9 +1096,8 @@ RecRegisterManagerCb(int _signal, RecManagerCb _fn, void *_data)
#else
void
-RecSignalManager(int id, const char *msg)
+RecSignalManager(int /* id ATS_UNUSED */, const char *msg)
{
- REC_NOWARN_UNUSED(id);
RecLog(DL_Warning, msg);
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/lib/records/RecLocal.cc
----------------------------------------------------------------------
diff --git a/lib/records/RecLocal.cc b/lib/records/RecLocal.cc
index 51b5c8e..0cd51c6 100644
--- a/lib/records/RecLocal.cc
+++ b/lib/records/RecLocal.cc
@@ -67,7 +67,6 @@ i_am_the_record_owner(RecT rec_type)
static void *
sync_thr(void *data)
{
- REC_NOWARN_UNUSED(data);
textBuffer tb(65536);
while (1) {
send_push_message();
@@ -101,7 +100,6 @@ sync_thr(void *data)
static void *
sync_thr(void *data)
{
- REC_NOWARN_UNUSED(data);
textBuffer *tb = NEW(new textBuffer(65536));
Rollback *rb;
@@ -137,7 +135,6 @@ sync_thr(void *data)
static void *
config_update_thr(void *data)
{
- REC_NOWARN_UNUSED(data);
while (true) {
RecExecConfigUpdateCbs(REC_LOCAL_UPDATE_REQUIRED);
usleep(REC_CONFIG_UPDATE_INTERVAL_MS * 1000);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/lib/records/RecMessage.cc
----------------------------------------------------------------------
diff --git a/lib/records/RecMessage.cc b/lib/records/RecMessage.cc
index 32fc8b6..744df26 100644
--- a/lib/records/RecMessage.cc
+++ b/lib/records/RecMessage.cc
@@ -97,7 +97,6 @@ recv_thr(void *data)
static void *
accept_thr(void *data)
{
- REC_NOWARN_UNUSED(data);
RecHandle h_pipe;
h_pipe = RecPipeCreate(Layout::get()->runtimedir, REC_PIPE_NAME);
ink_thread_create(send_thr, (void *) h_pipe);
@@ -112,7 +111,6 @@ accept_thr(void *data)
static void *
recv_cb_thr(void *data)
{
- REC_NOWARN_UNUSED(data);
RecMessage *msg;
while (true) {
if (g_recv_cb) {
@@ -488,8 +486,6 @@ RecMessageRegisterRecvCb(RecMessageRecvCb recv_cb, void *cookie)
void *
RecMessageRecvThis(void *cookie, char *data_raw, int data_len)
{
- REC_NOWARN_UNUSED(cookie);
- REC_NOWARN_UNUSED(data_len);
RecMessage *msg = (RecMessage *) data_raw;
g_recv_cb(msg, msg->msg_type, g_recv_cookie);
return NULL;
@@ -560,23 +556,3 @@ RecMessageWriteToDisk(RecMessage *msg, const char *fpath)
return REC_ERR_OKAY;
}
-
-//
-// [hack for tsunami, bevans] -- I need this exported to the ACC module somehow,
-// the acc module can't include stuff out put proxy/ or mgmt/
-//
-int
-RecAlarmSignal(int code, const char *msg, int msg_size)
-{
-#if defined (LOCAL_MANAGER)
- lmgmt->signalEvent(code, (char *) msg, msg_size);
-#elif defined(PROCESS_MANAGER)
- pmgmt->signalManager(code, (char *) msg, msg_size);
-#else
- REC_NOWARN_UNUSED(code);
- REC_NOWARN_UNUSED(msg);
- REC_NOWARN_UNUSED(msg_size);
-#endif
-
- return REC_ERR_OKAY;
-}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/lib/records/RecProcess.cc
----------------------------------------------------------------------
diff --git a/lib/records/RecProcess.cc b/lib/records/RecProcess.cc
index 53edf36..976d4a8 100644
--- a/lib/records/RecProcess.cc
+++ b/lib/records/RecProcess.cc
@@ -285,8 +285,6 @@ struct raw_stat_sync_cont: public Continuation
int exec_callbacks(int event, Event *e)
{
- REC_NOWARN_UNUSED(event);
- REC_NOWARN_UNUSED(e);
while (true) {
RecExecRawStatSyncCbs();
Debug("statsproc", "raw_stat_sync_cont() processed");
@@ -310,8 +308,6 @@ struct config_update_cont: public Continuation
int exec_callbacks(int event, Event *e)
{
- REC_NOWARN_UNUSED(event);
- REC_NOWARN_UNUSED(e);
while (true) {
RecExecConfigUpdateCbs(REC_PROCESS_UPDATE_REQUIRED);
Debug("statsproc", "config_update_cont() processed");
@@ -346,8 +342,6 @@ struct sync_cont: public Continuation
int sync(int event, Event *e)
{
- REC_NOWARN_UNUSED(event);
- REC_NOWARN_UNUSED(e);
while (true) {
send_push_message();
RecSyncStatsFile();
@@ -547,7 +541,6 @@ Ldone:
int
RecRawStatSyncSum(const char *name, RecDataT data_type, RecData *data, RecRawStatBlock *rsb, int id)
{
- REC_NOWARN_UNUSED(name);
RecRawStat total;
Debug("stats", "raw sync:sum for %s", name);
@@ -562,7 +555,6 @@ RecRawStatSyncSum(const char *name, RecDataT data_type, RecData *data, RecRawSta
int
RecRawStatSyncCount(const char *name, RecDataT data_type, RecData *data, RecRawStatBlock *rsb, int id)
{
- REC_NOWARN_UNUSED(name);
RecRawStat total;
Debug("stats", "raw sync:count for %s", name);
@@ -577,7 +569,6 @@ RecRawStatSyncCount(const char *name, RecDataT data_type, RecData *data, RecRawS
int
RecRawStatSyncAvg(const char *name, RecDataT data_type, RecData *data, RecRawStatBlock *rsb, int id)
{
- REC_NOWARN_UNUSED(name);
RecRawStat total;
RecFloat avg = 0.0f;
@@ -594,7 +585,6 @@ RecRawStatSyncAvg(const char *name, RecDataT data_type, RecData *data, RecRawSta
int
RecRawStatSyncHrTimeAvg(const char *name, RecDataT data_type, RecData *data, RecRawStatBlock *rsb, int id)
{
- REC_NOWARN_UNUSED(name);
RecRawStat total;
RecFloat r;
@@ -615,7 +605,6 @@ RecRawStatSyncHrTimeAvg(const char *name, RecDataT data_type, RecData *data, Rec
int
RecRawStatSyncIntMsecsToFloatSeconds(const char *name, RecDataT data_type, RecData *data, RecRawStatBlock *rsb, int id)
{
- REC_NOWARN_UNUSED(name);
RecRawStat total;
RecFloat r;
@@ -635,7 +624,6 @@ RecRawStatSyncIntMsecsToFloatSeconds(const char *name, RecDataT data_type, RecDa
int
RecRawStatSyncMHrTimeAvg(const char *name, RecDataT data_type, RecData *data, RecRawStatBlock *rsb, int id)
{
- REC_NOWARN_UNUSED(name);
RecRawStat total;
RecFloat r;
@@ -658,11 +646,9 @@ RecRawStatSyncMHrTimeAvg(const char *name, RecDataT data_type, RecData *data, Re
// RecIncrRawStatXXX
//-------------------------------------------------------------------------
int
-RecIncrRawStatBlock(RecRawStatBlock *rsb, EThread *ethread, RecRawStat *stat_array)
+RecIncrRawStatBlock(RecRawStatBlock */* rsb ATS_UNUSED */, EThread */* ethread ATS_UNUSED */,
+ RecRawStat */* stat_array ATS_UNUSED */)
{
- REC_NOWARN_UNUSED(rsb);
- REC_NOWARN_UNUSED(ethread);
- REC_NOWARN_UNUSED(stat_array);
return REC_ERR_FAIL;
}
@@ -687,10 +673,8 @@ RecSetRawStatCount(RecRawStatBlock *rsb, int id, int64_t data)
}
int
-RecSetRawStatBlock(RecRawStatBlock *rsb, RecRawStat *stat_array)
+RecSetRawStatBlock(RecRawStatBlock */* rsb ATS_UNUSED */, RecRawStat */* stat_array ATS_UNUSED */)
{
- REC_NOWARN_UNUSED(rsb);
- REC_NOWARN_UNUSED(stat_array);
return REC_ERR_FAIL;
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/lib/records/test_I_RecLocal.cc
----------------------------------------------------------------------
diff --git a/lib/records/test_I_RecLocal.cc b/lib/records/test_I_RecLocal.cc
index dfbc281..996167b 100644
--- a/lib/records/test_I_RecLocal.cc
+++ b/lib/records/test_I_RecLocal.cc
@@ -41,7 +41,6 @@ int g_config_update_result = 0;
int
cb_test_1a(const char *name, RecDataT data_type, RecData data, void *cookie)
{
- NOWARN_UNUSED(data_type);
if ((cookie == (void *) 0x12345678) && (strcmp(data.rec_string, "cb_test_1__changed") == 0)) {
g_config_update_result++;
printf(" - cb_test_1(%d) name: %s, data: %s, cookie: 0x%x\n",
@@ -59,12 +58,9 @@ cb_test_1b(const char *name, RecDataT data_type, RecData data, void *cookie)
}
int
-cb_test_2a(const char *name, RecDataT data_type, RecData data, void *cookie)
+cb_test_2a(const char */* name ATS_UNUSED */, RecDataT /* data_type ATS_UNUSED */,
+ RecData /* data ATS_UNUSED */, void */* cookie ATS_UNUSED */)
{
- NOWARN_UNUSED(name);
- NOWARN_UNUSED(data_type);
- NOWARN_UNUSED(data);
- NOWARN_UNUSED(cookie);
g_config_update_result = -1;
return REC_ERR_FAIL;
}
@@ -122,7 +118,6 @@ Test01()
int
cb_test_3a(const char *name, RecDataT data_type, RecData data, void *cookie)
{
- NOWARN_UNUSED(data_type);
RecString rec_result;
int rec_status = RecGetRecordString_Xmalloc(name, &rec_result);
@@ -250,8 +245,6 @@ Test03()
int
main(int argc, char **argv)
{
- NOWARN_UNUSED(argc);
-
// start diags logging
FILE *log_fp;
if ((log_fp = fopen("reclocal.log", "a+")) != NULL) {
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/lib/records/test_RecProcess.i
----------------------------------------------------------------------
diff --git a/lib/records/test_RecProcess.i b/lib/records/test_RecProcess.i
index ae29eaa..82084cf 100644
--- a/lib/records/test_RecProcess.i
+++ b/lib/records/test_RecProcess.i
@@ -115,7 +115,6 @@ RecCounter g_link_test_3 = 0;
int
cb_test_1(const char *name, RecDataT data_type, RecData data, void *cookie)
{
- NOWARN_UNUSED(data_type);
if ((cookie == (void *) 0x12345678) && (strcmp(data.rec_string, "cb_test_1__changed") == 0)) {
printf(" - cb_test_1 (name: %s, data: %s, cookie: 0x%x\n", name, data.rec_string, cookie);
g_config_update_result = true;
@@ -126,12 +125,9 @@ cb_test_1(const char *name, RecDataT data_type, RecData data, void *cookie)
}
int
-cb_test_2(const char *name, RecDataT data_type, RecData data, void *cookie)
+cb_test_2(const char */* name ATS_UNUSED */, RecDataT /* data_type ATS_UNUSED */,
+ RecData /* data ATS_UNUSED */, void * /* cookie ATS_UNUSED */)
{
- NOWARN_UNUSED(name);
- NOWARN_UNUSED(data_type);
- NOWARN_UNUSED(data);
- NOWARN_UNUSED(cookie);
g_config_update_result = false;
return REC_ERR_FAIL;
}
@@ -297,9 +293,6 @@ static int g_time = 0;
int
raw_stat_sync_ticks_per_sec(const char *name, RecDataT data_type, RecData * data, RecRawStatBlock * rsb, int id)
{
- NOWARN_UNUSED(name);
- NOWARN_UNUSED(data_type);
-
ink64 ticks_old, time_old;
ink64 ticks_new, time_new;
@@ -342,8 +335,6 @@ struct RawStatCont:public Continuation
}
int dummy_function(int event, Event * e)
{
- NOWARN_UNUSED(event);
- NOWARN_UNUSED(e);
printf("------------Raw Stat dump-------------\n");
ink64 hr_start, hr_finish;
// comments out here. Why stat_a is int?
@@ -558,10 +549,8 @@ struct DumpRecordsHtCont:public Continuation
{
SET_HANDLER(&DumpRecordsHtCont::dummy_function);
}
- int dummy_function(int event, Event * e)
+ int dummy_function(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
{
- NOWARN_UNUSED(event);
- NOWARN_UNUSED(e);
RecDumpRecordsHt(RECT_NULL);
return 0;
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf21050a/lib/records/test_RecTree.cc
----------------------------------------------------------------------
diff --git a/lib/records/test_RecTree.cc b/lib/records/test_RecTree.cc
index 5fa5083..64d99a2 100644
--- a/lib/records/test_RecTree.cc
+++ b/lib/records/test_RecTree.cc
@@ -27,11 +27,8 @@
int
main(int argc, char **argv)
{
-
- REC_NOWARN_UNUSED(argc);
- REC_NOWARN_UNUSED(argv);
-
RecTree *new_rec_tree = new RecTree(NULL);
+
new_rec_tree->rec_tree_insert("proxy.process.librecords.first_child");
printf("\n");
new_rec_tree->rec_tree_insert("proxy.process.librecords.first_child.grandchild1");