trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject svn commit: r982072 - in /trafficserver/traffic/trunk: ./ iocore/cache/ iocore/cluster/ iocore/hostdb/ iocore/net/ iocore/utils/ libinktomi++/ proxy/ proxy/api/ts/ proxy/congest/
Date Tue, 03 Aug 2010 23:22:05 GMT
Author: zwoop
Date: Tue Aug  3 23:22:04 2010
New Revision: 982072

URL: http://svn.apache.org/viewvc?rev=982072&view=rev
Log:
TS-400 Checkpoint 6 in cleanup.

Modified:
    trafficserver/traffic/trunk/configure.ac
    trafficserver/traffic/trunk/iocore/cache/Cache.cc
    trafficserver/traffic/trunk/iocore/cache/CacheDir.cc
    trafficserver/traffic/trunk/iocore/cache/CachePages.cc
    trafficserver/traffic/trunk/iocore/cache/CachePagesInternal.cc
    trafficserver/traffic/trunk/iocore/cache/NewCacheVC.cc
    trafficserver/traffic/trunk/iocore/cache/P_CacheTest.h
    trafficserver/traffic/trunk/iocore/cache/RamCacheCLFUS.cc
    trafficserver/traffic/trunk/iocore/cache/RamCacheLRU.cc
    trafficserver/traffic/trunk/iocore/cache/Store.cc
    trafficserver/traffic/trunk/iocore/cluster/ClusterAPI.cc
    trafficserver/traffic/trunk/iocore/cluster/ClusterCache.cc
    trafficserver/traffic/trunk/iocore/cluster/ClusterConfig.cc
    trafficserver/traffic/trunk/iocore/cluster/P_ClusterHandler.h
    trafficserver/traffic/trunk/iocore/hostdb/HostDB.cc
    trafficserver/traffic/trunk/iocore/hostdb/MultiCache.cc
    trafficserver/traffic/trunk/iocore/net/UnixNetPages.cc
    trafficserver/traffic/trunk/iocore/utils/I_OneWayMultiTunnel.h
    trafficserver/traffic/trunk/iocore/utils/MTInteractor.cc
    trafficserver/traffic/trunk/iocore/utils/Machine.cc
    trafficserver/traffic/trunk/libinktomi++/ink_queue.cc
    trafficserver/traffic/trunk/proxy/RegressionSM.h
    trafficserver/traffic/trunk/proxy/api/ts/ts.h
    trafficserver/traffic/trunk/proxy/congest/Congestion.h

Modified: trafficserver/traffic/trunk/configure.ac
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/configure.ac?rev=982072&r1=982071&r2=982072&view=diff
==============================================================================
--- trafficserver/traffic/trunk/configure.ac (original)
+++ trafficserver/traffic/trunk/configure.ac Tue Aug  3 23:22:04 2010
@@ -451,12 +451,13 @@ case $host_os in
       #  873 is "has no corresponding operator delete". ToDo: we should fix.
       #  981 is "operands are evaluated in unspecified order"
       # 1418 is "external function definition with no prior declaration"
+      # 1419 is "external declaration in primary source file"
       # 1720 is "operator new" has no corresponding member operator delete"
       # 2256 is "non-pointer conversion from "int" to "unsigned char" "
       # 2259 is "non-pointer conversion from "int" to "unsigned char" "
       # 
       # TODO: We should try to eliminate more of these -wd exclusions.
-      common_opt="-pipe -Wall -wd111 -wd279 -wd522 -wd444 -wd873 -wd981 -wd1418 -wd1720 -wd2256
-wd2259"
+      common_opt="-pipe -Wall -wd111 -wd279 -wd522 -wd444 -wd873 -wd981 -wd1418 -wd1419 -wd1720
-wd2256 -wd2259"
       debug_opt="-ggdb3 $common_opt"
       release_opt="-g $common_opt -O2 -axsse4.2 -fno-strict-aliasing"
       cxx_opt="-Wno-invalid-offsetof"

Modified: trafficserver/traffic/trunk/iocore/cache/Cache.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/Cache.cc?rev=982072&r1=982071&r2=982072&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/Cache.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/Cache.cc Tue Aug  3 23:22:04 2010
@@ -169,6 +169,10 @@ int
 cache_stats_bytes_used_cb(const char *name,
                           RecDataT data_type, RecData *data, RecRawStatBlock *rsb, int id,
void *cookie)
 {
+  NOWARN_UNUSED(name);
+  NOWARN_UNUSED(data_type);
+  NOWARN_UNUSED(data);
+  NOWARN_UNUSED(cookie);
   if (cacheProcessor.initialized == CACHE_INITIALIZED) {
     RecSetGlobalRawStatSum(rsb, id, cache_bytes_used());
   }
@@ -226,6 +230,7 @@ CacheVC::do_io_read(Continuation *c, int
 VIO *
 CacheVC::do_io_pread(Continuation *c, int64 nbytes, MIOBuffer *abuf, int64 offset)
 {
+  NOWARN_UNUSED(nbytes);
   ink_assert(vio.op == VIO::READ);
   vio.buffer.writer_for(abuf);
   vio.set_continuation(c);
@@ -870,8 +875,8 @@ Part::db_check(bool fix)
   ink_ctime_r(&header->create_time, tt);
   tt[strlen(tt) - 1] = 0;
   printf("        Create Time:     %s\n", tt);
-  printf("        Sync Serial:     %u\n", (int) header->sync_serial);
-  printf("        Write Serial:    %u\n", (int) header->write_serial);
+  printf("        Sync Serial:     %d\n", (int) header->sync_serial);
+  printf("        Write Serial:    %d\n", (int) header->write_serial);
   printf("\n");
 
   return 0;
@@ -1207,7 +1212,6 @@ Part::handle_recover_from_data(int event
   if (got_len) {
 
     Doc *doc = NULL;
-    Doc *last_doc = NULL;
 
     if (recover_wrapped && start == io.aiocb.aio_offset) {
       doc = (Doc *) s;
@@ -1290,7 +1294,6 @@ Part::handle_recover_from_data(int event
       }
       // doc->magic == DOC_MAGIC && doc->sync_serial == last_sync_serial
       last_write_serial = doc->write_serial;
-      last_doc = doc;
       s += round_to_approx_size(doc->len);
     }
 
@@ -1885,6 +1888,7 @@ Ldone:
 int
 CacheVC::handleRead(int event, Event *e)
 {
+  NOWARN_UNUSED(event);
   NOWARN_UNUSED(e);
   cancel_trigger();
 

Modified: trafficserver/traffic/trunk/iocore/cache/CacheDir.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/CacheDir.cc?rev=982072&r1=982071&r2=982072&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/CacheDir.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/CacheDir.cc Tue Aug  3 23:22:04 2010
@@ -1134,8 +1134,8 @@ Part::dir_check(bool fix)
   int total = buckets * segments * DIR_DEPTH;
   printf("    Directory for [%s]\n", hash_id);
   printf("        Bytes:     %d\n", total * SIZEOF_DIR);
-  printf("        Segments:  %lld\n", (uint64)segments);
-  printf("        Buckets:   %lld\n", (uint64)buckets);
+  printf("        Segments:  %llu\n", (uint64)segments);
+  printf("        Buckets:   %llu\n", (uint64)buckets);
   printf("        Entries:   %d\n", total);
   printf("        Full:      %d\n", full);
   printf("        Empty:     %d\n", empty);

Modified: trafficserver/traffic/trunk/iocore/cache/CachePages.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/CachePages.cc?rev=982072&r1=982071&r2=982072&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/CachePages.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/CachePages.cc Tue Aug  3 23:22:04 2010
@@ -27,7 +27,7 @@
 #include "api/ts/ts.h"
 #include "Show.h"
 
-struct ShowCache:ShowCont
+struct ShowCache: public ShowCont
 {
   int part_index;
   int seg_index;

Modified: trafficserver/traffic/trunk/iocore/cache/CachePagesInternal.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/CachePagesInternal.cc?rev=982072&r1=982071&r2=982072&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/CachePagesInternal.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/CachePagesInternal.cc Tue Aug  3 23:22:04 2010
@@ -26,7 +26,7 @@
 #ifdef NON_MODULAR
 #include "Show.h"
 
-struct ShowCacheInternal:ShowCont
+struct ShowCacheInternal: public ShowCont
 {
   int part_index;
   int seg_index;
@@ -216,7 +216,7 @@ ShowCacheInternal::showPartEvacuations(i
   for (int i = 0; i < last; i++) {
     for (b = p->evacuate[i].head; b; b = b->link.next) {
       char offset[60];
-      sprintf(offset, "%lld", (uint64) part_offset(p, &b->dir));
+      sprintf(offset, "%llu", (uint64) part_offset(p, &b->dir));
       CHECK_SHOW(show("<tr>" "<td>%s</td>"      // offset
                       "<td>%d</td>"     // estimated size
                       "<td>%d</td>"     // reader count

Modified: trafficserver/traffic/trunk/iocore/cache/NewCacheVC.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/NewCacheVC.cc?rev=982072&r1=982071&r2=982072&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/NewCacheVC.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/NewCacheVC.cc Tue Aug  3 23:22:04 2010
@@ -164,6 +164,7 @@ NewCacheVC::do_io_read(Continuation * c,
 int
 NewCacheVC::handleRead(int event, Event * e)
 {
+  NOWARN_UNUSED(e);
   Debug("cache_plugin", "[NewCacheVC::handleRead] this=%lX event=%d", (long) this, event);
   cancel_trigger();
 
@@ -230,6 +231,7 @@ NewCacheVC::do_io_write(Continuation * c
 int
 NewCacheVC::handleWrite(int event, Event * e)
 {
+  NOWARN_UNUSED(e);
   Debug("cache_plugin", "[NewCacheVC::handleWrite] event=%d", event);
   cancel_trigger();
 
@@ -268,6 +270,7 @@ NewCacheVC::alloc(Continuation * cont, U
 void
 NewCacheVC::setWriteVC(CacheHTTPInfo * old_info)
 {
+  NOWARN_UNUSED(old_info);
   cancel_trigger();
   _vio.op = VIO::WRITE;
   closed = false;
@@ -309,6 +312,7 @@ NewCacheVC::do_io_close(int lerrno)
 void
 NewCacheVC::reenable_re(VIO * vio)
 {
+  NOWARN_UNUSED(vio);
   Debug("cache_plugin", "[NewCacheVC::reenable_re]");
 }
 
@@ -395,6 +399,7 @@ NewCacheVC::_append_unmarshal_buf(const 
 int
 NewCacheVC::handleLookup(int event, Event * e)
 {
+  NOWARN_UNUSED(e);
   Debug("cache_plugin", "[NewCacheVC::handleLookup] event=%d", event);
   cancel_trigger();
 

Modified: trafficserver/traffic/trunk/iocore/cache/P_CacheTest.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/P_CacheTest.h?rev=982072&r1=982071&r2=982072&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/P_CacheTest.h (original)
+++ trafficserver/traffic/trunk/iocore/cache/P_CacheTest.h Tue Aug  3 23:22:04 2010
@@ -38,7 +38,7 @@ struct PinnedDocEntry
   LINK(PinnedDocEntry, link);
 };
 
-struct PinnedDocTable:Continuation
+struct PinnedDocTable: public Continuation
 {
   Queue<PinnedDocEntry> bucket[PINNED_DOC_TABLE_SIZE];
 
@@ -66,7 +66,7 @@ struct CacheTestHeader {
   uint64 serial;
 };
 
-struct CacheTestSM : RegressionSM {
+struct CacheTestSM : public RegressionSM {
   int start_memcpy_on_clone; // place all variables to be copied between these markers
   Action *timeout;
   Action *cache_action;
@@ -119,7 +119,7 @@ struct CacheTestSM : RegressionSM {
 
 // It is 2010 and C++ STILL doesn't have closures, a technology of the 1950s, unbelievable
 #define CACHE_SM(_t, _sm, _f)                \
-  struct CacheTestSM__##_sm : CacheTestSM { \
+  struct CacheTestSM__##_sm : public CacheTestSM { \
     void make_request_internal() _f \
     CacheTestSM__##_sm(RegressionTest *t) : CacheTestSM(t) {} \
     CacheTestSM__##_sm(const CacheTestSM__##_sm &xsm) : CacheTestSM(xsm) {} \

Modified: trafficserver/traffic/trunk/iocore/cache/RamCacheCLFUS.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/RamCacheCLFUS.cc?rev=982072&r1=982071&r2=982072&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/RamCacheCLFUS.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/RamCacheCLFUS.cc Tue Aug  3 23:22:04 2010
@@ -65,7 +65,7 @@ struct RamCacheCLFUSEntry {
   Ptr<IOBufferData> data;
 };
 
-struct RamCacheCLFUS : RamCache {
+struct RamCacheCLFUS : public RamCache {
   int64 max_bytes;
   int64 bytes;
   int64 objects;
@@ -100,7 +100,7 @@ struct RamCacheCLFUS : RamCache {
 
 ClassAllocator<RamCacheCLFUSEntry> ramCacheCLFUSEntryAllocator("RamCacheCLFUSEntry");
 
-const static int bucket_sizes[] = {
+static const int bucket_sizes[] = {
   127, 251, 509, 1021, 2039, 4093, 8191, 16381, 32749, 65521, 131071, 262139,
   524287, 1048573, 2097143, 4194301, 8388593, 16777213, 33554393, 67108859,
   134217689, 268435399, 536870909, 1073741789, 2147483647

Modified: trafficserver/traffic/trunk/iocore/cache/RamCacheLRU.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/RamCacheLRU.cc?rev=982072&r1=982071&r2=982072&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/RamCacheLRU.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/RamCacheLRU.cc Tue Aug  3 23:22:04 2010
@@ -32,7 +32,7 @@ struct RamCacheLRUEntry {
   Ptr<IOBufferData> data;
 };
 
-struct RamCacheLRU : RamCache {
+struct RamCacheLRU: public RamCache {
   int64 max_bytes;
   int64 bytes;
   int64 objects;
@@ -60,7 +60,7 @@ struct RamCacheLRU : RamCache {
 
 ClassAllocator<RamCacheLRUEntry> ramCacheLRUEntryAllocator("RamCacheLRUEntry");
 
-const static int bucket_sizes[] = {
+static const int bucket_sizes[] = {
   127, 251, 509, 1021, 2039, 4093, 8191, 16381, 32749, 65521, 131071, 262139,
   524287, 1048573, 2097143, 4194301, 8388593, 16777213, 33554393, 67108859,
   134217689, 268435399, 536870909

Modified: trafficserver/traffic/trunk/iocore/cache/Store.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/Store.cc?rev=982072&r1=982071&r2=982072&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/Store.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/Store.cc Tue Aug  3 23:22:04 2010
@@ -216,7 +216,7 @@ get_int64(int fd, int64 & data)
   // the above line will guarantee buf to be no longer than PATH_NAME_MAX
   // so the next statement should be a safe use of sscanf
   // coverity[secure_coding]
-  if (sscanf(buf, "%llu", &data) != 1) {
+  if (sscanf(buf, "%lld", &data) != 1) {
     return (-1);
   }
   return 0;
@@ -866,7 +866,7 @@ Span::write(int fd)
   if (ink_file_fd_writestring(fd, "\n") == -1)
     return (-1);
 
-  snprintf(buf, sizeof(buf), "%llu\n", blocks);
+  snprintf(buf, sizeof(buf), "%lld\n", blocks);
   if (ink_file_fd_writestring(fd, buf) == -1)
     return (-1);
 
@@ -874,11 +874,11 @@ Span::write(int fd)
   if (ink_file_fd_writestring(fd, buf) == -1)
     return (-1);
 
-  snprintf(buf, sizeof(buf), "%llu\n", offset);
+  snprintf(buf, sizeof(buf), "%lld\n", offset);
   if (ink_file_fd_writestring(fd, buf) == -1)
     return (-1);
 
-  snprintf(buf, sizeof(buf), "%u\n", (int) is_mmapable());
+  snprintf(buf, sizeof(buf), "%d\n", (int) is_mmapable());
   if (ink_file_fd_writestring(fd, buf) == -1)
     return (-1);
 
@@ -955,7 +955,7 @@ Span::read(int fd)
   // the above line will guarantee buf to be no longer than PATH_NAME_MAX
   // so the next statement should be a safe use of sscanf
   // coverity[secure_coding]
-  if (sscanf(buf, "%u", &tmp) != 1)
+  if (sscanf(buf, "%d", &tmp) != 1)
     return (-1);
   set_mmapable(tmp != 0);
 

Modified: trafficserver/traffic/trunk/iocore/cluster/ClusterAPI.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cluster/ClusterAPI.cc?rev=982072&r1=982071&r2=982072&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cluster/ClusterAPI.cc (original)
+++ trafficserver/traffic/trunk/iocore/cluster/ClusterAPI.cc Tue Aug  3 23:22:04 2010
@@ -50,7 +50,6 @@ typedef struct node_callout_entry
 
 static ProxyMutex *ClusterAPI_mutex;
 static ClusterAPIPeriodicSM *periodicSM;
-static Action *periodicSM_action;
 
 static node_callout_entry_t status_callouts[MAX_CLUSTERSTATUS_CALLOUTS];
 static INKClusterRPCFunction RPC_Functions[API_END_CLUSTER_FUNCTION];
@@ -121,6 +120,8 @@ private:
 int
 MachineStatusSM::MachineStatusSMEvent(Event * e, void *d)
 {
+  NOWARN_UNUSED(e);
+  NOWARN_UNUSED(d);
   int n;
   EThread *et = this_ethread();
 
@@ -291,7 +292,8 @@ clusterAPI_init()
   ink_release_assert(lock);     // Should never fail
   periodicSM = NEW(new ClusterAPIPeriodicSM(ClusterAPI_mutex));
 
-  periodicSM_action = eventProcessor.schedule_every(periodicSM, HRTIME_SECONDS(1), ET_CALL);
+  // TODO: Should we do something with this return value?
+  eventProcessor.schedule_every(periodicSM, HRTIME_SECONDS(1), ET_CALL);
 }
 
 /*
@@ -375,10 +377,6 @@ INKEnableClusterStatusCallout(INKCluster
   int ci = CLUSTER_STATUS_HANDLE_TO_INDEX(*h);
   // This isn't used.
   // int my_ipaddr = (this_cluster_machine())->ip;
-  EThread *e = this_ethread();
-
-  NOWARN_UNUSED(e);
-
   ink_release_assert((ci >= 0) && (ci < MAX_CLUSTERSTATUS_CALLOUTS));
 
   if (status_callouts[ci].state == NE_STATE_INITIALIZED) {

Modified: trafficserver/traffic/trunk/iocore/cluster/ClusterCache.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cluster/ClusterCache.cc?rev=982072&r1=982071&r2=982072&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cluster/ClusterCache.cc (original)
+++ trafficserver/traffic/trunk/iocore/cluster/ClusterCache.cc Tue Aug  3 23:22:04 2010
@@ -311,6 +311,7 @@ ClusterVConnectionCache::lookup(INK_MD5 
 int
 ClusterVConnectionCacheEvent::eventHandler(int event, 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) {
@@ -796,6 +797,7 @@ CacheContinuation::lookupOpenWriteVCEven
 int
 CacheContinuation::remove_and_delete(int event, Event * e)
 {
+  NOWARN_UNUSED(event);
   unsigned int hash = FOLDHASH(target_ip, seq_number);
   MUTEX_TRY_LOCK(queuelock, remoteCacheContQueueMutex[hash], this_ethread());
   if (queuelock) {
@@ -1360,13 +1362,10 @@ cache_op_ClusterFunction(ClusterMachine 
       p += res;
 
       CacheKey key(msg->url_md5);
-
       char *hostname = NULL;
-      int host_len = 0;
 
       if (moi_len) {
         hostname = (char *) p;
-        host_len = moi_len;
       }
 
       Cache *call_cache = caches[c->frag_type];
@@ -1856,6 +1855,7 @@ CacheContinuation::setupReadBufTunnel(VC
 int
 CacheContinuation::tunnelClosedEvent(int event, void *c)
 {
+  NOWARN_UNUSED(event);
   ink_assert(magicno == (int) MagicNo);
   // Note: We are called with the tunnel_mutex held.
   CacheContinuation *tc = (CacheContinuation *) c;
@@ -1941,6 +1941,7 @@ CacheContinuation::disposeOfDataBuffer(v
 int
 CacheContinuation::handleDisposeEvent(int event, CacheContinuation * cc)
 {
+  NOWARN_UNUSED(event);
   ink_assert(cc->magicno == (int) MagicNo);
   MUTEX_TRY_LOCK(lock, cc->tunnel_mutex, this_ethread());
   if (lock) {
@@ -2473,6 +2474,7 @@ retry:
 int
 CacheContinuation::probeLookupEvent(int event, void *d)
 {
+  NOWARN_UNUSED(d);
   ink_assert(magicno == (int) MagicNo);
   callback_user(event, 0);
   return EVENT_DONE;
@@ -2485,6 +2487,8 @@ CacheContinuation::probeLookupEvent(int 
 int
 CacheContinuation::lookupEvent(int event, void *d)
 {
+  NOWARN_UNUSED(event);
+  NOWARN_UNUSED(d);
   ink_release_assert(!"Invalid call CacheContinuation::lookupEvent");
   return EVENT_DONE;
 
@@ -2676,6 +2680,7 @@ cache_lookup_ClusterFunction(ClusterMach
 int
 CacheContinuation::replyLookupEvent(int event, void *d)
 {
+  NOWARN_UNUSED(d);
   ink_hrtime now;
   now = ink_get_hrtime();
   CLUSTER_SUM_DYN_STAT(CLUSTER_CACHE_CALLBACK_TIME_STAT, now - start_time);
@@ -2781,6 +2786,8 @@ CacheContinuation::insert_cache_callback
 int
 CacheContinuation::insertCallbackEvent(int event, Event * e)
 {
+  NOWARN_UNUSED(event);
+  NOWARN_UNUSED(e);
   if (GlobalOpenWriteVCcache->insert(&url_md5, (ClusterVConnection *)
                                      callback_data_2)) {
     // Inserted
@@ -2833,6 +2840,8 @@ CacheContinuation::defer_callback_result
 int
 CacheContinuation::callbackResultEvent(int event, Event * e)
 {
+  NOWARN_UNUSED(event);
+  NOWARN_UNUSED(e);
   if (!action.cancelled)
     action.continuation->handleEvent(result, callback_data);
   cacheContAllocator_free(this);
@@ -2909,6 +2918,8 @@ CacheContinuation::callback_failure(Acti
 int
 CacheContinuation::callbackEvent(int event, Event * e)
 {
+  NOWARN_UNUSED(event);
+  NOWARN_UNUSED(e);
   if (!action.cancelled)
     action.continuation->handleEvent(result, (void *)(intptr_t)result_error);
   cacheContAllocator_free(this);

Modified: trafficserver/traffic/trunk/iocore/cluster/ClusterConfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cluster/ClusterConfig.cc?rev=982072&r1=982071&r2=982072&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cluster/ClusterConfig.cc (original)
+++ trafficserver/traffic/trunk/iocore/cluster/ClusterConfig.cc Tue Aug  3 23:22:04 2010
@@ -32,15 +32,14 @@
 int cluster_port = DEFAULT_CLUSTER_PORT_NUMBER;
 
 ClusterAccept::ClusterAccept(int *port, int send_bufsize, int recv_bufsize)
-  :
-Continuation(0),
-p_cluster_port(port),
-socket_send_bufsize(send_bufsize),
-socket_recv_bufsize(recv_bufsize),
-socket_opt_flags(0),
-current_cluster_port(-1),
-accept_action(0),
-periodic_event(0)
+  : Continuation(0),
+    p_cluster_port(port),
+    socket_send_bufsize(send_bufsize),
+    socket_recv_bufsize(recv_bufsize),
+    socket_opt_flags(0),
+    current_cluster_port(-1),
+    accept_action(0),
+    periodic_event(0)
 {
   mutex = new_ProxyMutex();
   SET_HANDLER(&ClusterAccept::ClusterAcceptEvent);
@@ -152,10 +151,12 @@ ClusterAccept::ClusterAcceptMachine(NetV
 static void
 make_cluster_connections(MachineList * l, MachineList * old)
 {
+  NOWARN_UNUSED(old);
   //
   // Connect to all new machines.
   //
   uint32 ip = this_cluster_machine()->ip;
+
   if (l) {
     for (int i = 0; i < l->n; i++)
 #ifdef LOCAL_CLUSTER_TEST_MODE
@@ -170,6 +171,9 @@ make_cluster_connections(MachineList * l
 int
 machine_config_change(const char *name, RecDataT data_type, 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
@@ -228,36 +232,33 @@ ClusterConfiguration::ClusterConfigurati
 /*************************************************************************/
 struct ConfigurationContinuation;
 typedef int (ConfigurationContinuation::*CfgContHandler) (int, void *);
-struct ConfigurationContinuation:
-  Continuation
+struct ConfigurationContinuation: public Continuation
 {
-  ClusterConfiguration *
-    c;
-  ClusterConfiguration *
-    prev;
+  ClusterConfiguration *c;
+  ClusterConfiguration *prev;
+
   int
   zombieEvent(int event, Event * e)
   {
+    NOWARN_UNUSED(event);
     prev->link.next = NULL;     // remove that next pointer
     SET_HANDLER((CfgContHandler) & ConfigurationContinuation::dieEvent);
-    e->
-    schedule_in(CLUSTER_CONFIGURATION_ZOMBIE);
-    return
-      EVENT_CONT;
+    e->schedule_in(CLUSTER_CONFIGURATION_ZOMBIE);
+    return EVENT_CONT;
   }
+
   int
   dieEvent(int event, Event * e)
   {
     (void) event;
     (void) e;
-    delete
-      c;
-    delete
-      this;
+    delete c;
+    delete this;
     return EVENT_DONE;
   }
+
   ConfigurationContinuation(ClusterConfiguration * cc, ClusterConfiguration * aprev)
-:  Continuation(NULL), c(cc), prev(aprev) {
+    : Continuation(NULL), c(cc), prev(aprev) {
     mutex = new_ProxyMutex();
     SET_HANDLER((CfgContHandler) & ConfigurationContinuation::zombieEvent);
   }
@@ -283,14 +284,10 @@ configuration_add_machine(ClusterConfigu
   // Build a new cluster configuration with the new machine.
   // Machines are stored in ip sorted order.
   //
-  EThread *
-    thread = this_ethread();
-  ProxyMutex *
-    mutex = thread->mutex;
-  int
-    i = 0;
-  ClusterConfiguration *
-    cc = NEW(new ClusterConfiguration(*c));
+  EThread *thread = this_ethread();
+  ProxyMutex *mutex = thread->mutex;
+  int i = 0;
+  ClusterConfiguration *cc = NEW(new ClusterConfiguration(*c));
 
   // Find the place to insert this new machine
   //
@@ -324,15 +321,13 @@ configuration_add_machine(ClusterConfigu
 ClusterConfiguration *
 configuration_remove_machine(ClusterConfiguration * c, ClusterMachine * m)
 {
-  EThread *
-    thread = this_ethread();
-  ProxyMutex *
-    mutex = thread->mutex;
+  EThread *thread = this_ethread();
+  ProxyMutex *mutex = thread->mutex;
+
   //
   // Build a new cluster configuration without a machine
   //
-  ClusterConfiguration *
-    cc = NEW(new ClusterConfiguration(*c));
+  ClusterConfiguration *cc = NEW(new ClusterConfiguration(*c));
   //
   // remove m and move others down
   //
@@ -369,12 +364,11 @@ configuration_remove_machine(ClusterConf
 int
 cluster_machine_depth_list(unsigned int hash, ClusterMachine ** depth_list, int depth_list_size)
 {
-  int
-    n = 0;
-  ClusterConfiguration *
-    cc = this_cluster()->current_configuration();
-  ClusterMachine *
-    m = cc->machine_hash(hash);
+  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;
 
@@ -410,14 +404,10 @@ cluster_machine_at_depth(unsigned int ha
     cc = this_cluster()->current_configuration();
   ClusterConfiguration *
     next_cc = cc;
-  ink_hrtime
-    now = ink_get_hrtime();
-  int
-    fake_probe_depth = 0;
-  int &
-    probe_depth = pprobe_depth ? (*pprobe_depth) : fake_probe_depth;
-  int
-    tprobe_depth = probe_depth;
+  ink_hrtime now = ink_get_hrtime();
+  int fake_probe_depth = 0;
+  int &probe_depth = pprobe_depth ? (*pprobe_depth) : fake_probe_depth;
+  int tprobe_depth = probe_depth;
 
 #ifdef CLUSTER_TEST
   if (cc->n_machines > 1) {

Modified: trafficserver/traffic/trunk/iocore/cluster/P_ClusterHandler.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cluster/P_ClusterHandler.h?rev=982072&r1=982071&r2=982072&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cluster/P_ClusterHandler.h (original)
+++ trafficserver/traffic/trunk/iocore/cluster/P_ClusterHandler.h Tue Aug  3 23:22:04 2010
@@ -328,7 +328,7 @@ ClusterMsg():descriptor(NULL), iob_descr
 // State for a particular (read/write) direction of a cluster link
 //
 struct ClusterHandler;
-struct ClusterState:Continuation
+struct ClusterState: public Continuation
 {
   ClusterHandler *ch;
   bool read_channel;

Modified: trafficserver/traffic/trunk/iocore/hostdb/HostDB.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/hostdb/HostDB.cc?rev=982072&r1=982071&r2=982072&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/hostdb/HostDB.cc (original)
+++ trafficserver/traffic/trunk/iocore/hostdb/HostDB.cc Tue Aug  3 23:22:04 2010
@@ -1082,9 +1082,9 @@ remove_round_robin(HostDBInfo * r, char 
               unsigned int rr_ip = rr->info[n].ip();
               unsigned char *pip = (unsigned char *) &rr_ip;
 #ifdef __alpha
-              int nbytes = sprintf(p, "%u.%u.%u.%u ", pip[0], pip[1], pip[2], pip[3]);
+              int nbytes = sprintf(p, "%hu.%hu.%hu.%hu ", pip[0], pip[1], pip[2], pip[3]);
 #else
-              int nbytes = snprintf(p, bufsize, "%u.%u.%u.%u ", pip[0], pip[1], pip[2], pip[3]);
+              int nbytes = snprintf(p, bufsize, "%hu.%hu.%hu.%hu ", pip[0], pip[1], pip[2],
pip[3]);
 #endif
               p += nbytes;
               bufsize -= nbytes;
@@ -2039,7 +2039,7 @@ HostDBContinuation::backgroundEvent(int 
 
 bool HostDBInfo::match(INK_MD5 & md5, int bucket, int buckets)
 {
-  NOWARN_UNUSED(buckets);
+  NOWARN_UNUSED(bucket);
   if (md5[1] != md5_high)
     return false;
 

Modified: trafficserver/traffic/trunk/iocore/hostdb/MultiCache.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/hostdb/MultiCache.cc?rev=982072&r1=982071&r2=982072&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/hostdb/MultiCache.cc (original)
+++ trafficserver/traffic/trunk/iocore/hostdb/MultiCache.cc Tue Aug  3 23:22:04 2010
@@ -822,7 +822,7 @@ void
 MultiCacheBase::print_info(FILE * fp)
 {                               // STDIO OK
   fprintf(fp, "    Elements:       %-10d\n", totalelements);
-  fprintf(fp, "    Size (bytes):   %-10d\n", totalsize);
+  fprintf(fp, "    Size (bytes):   %-10u\n", totalsize);
 }
 
 
@@ -1045,7 +1045,7 @@ MultiCacheBase::sync_all()
 //
 struct MultiCacheSync;
 typedef int (MultiCacheSync::*MCacheSyncHandler) (int, void *);
-struct MultiCacheSync:Continuation
+struct MultiCacheSync: public Continuation
 {
   int partition;
   MultiCacheBase *mc;
@@ -1169,7 +1169,7 @@ struct OffsetTable
 
 struct MultiCacheHeapGC;
 typedef int (MultiCacheHeapGC::*MCacheHeapGCHandler) (int, void *);
-struct MultiCacheHeapGC:Continuation
+struct MultiCacheHeapGC: public Continuation
 {
   Continuation *cont;
   MultiCacheBase *mc;
@@ -1351,9 +1351,9 @@ MultiCacheBase::alloc(int *poffset, int 
     int part = ptr_to_partition((char *) poffset);
     if (part < 0)
       return NULL;
-    UnsunkPtr *p = unsunk[part].alloc(poffset);
-    p->offset = offset;
-    p->poffset = poffset;
+    UnsunkPtr *up = unsunk[part].alloc(poffset);
+    up->offset = offset;
+    up->poffset = poffset;
     Debug("multicache", "alloc unsunk %d at %d part %d offset %d", *poffset, (char *) poffset
- data, part, offset);
   }
   return (void *) p;

Modified: trafficserver/traffic/trunk/iocore/net/UnixNetPages.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/net/UnixNetPages.cc?rev=982072&r1=982071&r2=982072&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/net/UnixNetPages.cc (original)
+++ trafficserver/traffic/trunk/iocore/net/UnixNetPages.cc Tue Aug  3 23:22:04 2010
@@ -68,9 +68,9 @@ struct ShowNet: public ShowCont
       if (port && port != vc->port && port != vc->accept_port)
         continue;
       char ipbuf[80];
-      snprintf(ipbuf, sizeof(ipbuf), "%u.%u.%u.%u", PRINT_IP(vc->ip));
+      snprintf(ipbuf, sizeof(ipbuf), "%hu.%hu.%hu.%hu", PRINT_IP(vc->ip));
       char interbuf[80];
-      snprintf(interbuf, sizeof(interbuf), "[%s] %u.%u.%u.%u", vc->options.toString(vc->options.addr_binding),
PRINT_IP(vc->options.local_addr));
+      snprintf(interbuf, sizeof(interbuf), "[%s] %hu.%hu.%hu.%hu", vc->options.toString(vc->options.addr_binding),
PRINT_IP(vc->options.local_addr));
       CHECK_SHOW(show("<tr>"
                       // "<td><a href=\"/connection/%d\">%d</a></td>"
                       "<td>%d</td>" "<td>%s</td>"       // ipbuf

Modified: trafficserver/traffic/trunk/iocore/utils/I_OneWayMultiTunnel.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/utils/I_OneWayMultiTunnel.h?rev=982072&r1=982071&r2=982072&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/utils/I_OneWayMultiTunnel.h (original)
+++ trafficserver/traffic/trunk/iocore/utils/I_OneWayMultiTunnel.h Tue Aug  3 23:22:04 2010
@@ -53,7 +53,7 @@
   @see OneWayTunnel
 
 */
-struct OneWayMultiTunnel:OneWayTunnel
+struct OneWayMultiTunnel: public OneWayTunnel
 {
   //
   // Public Interface

Modified: trafficserver/traffic/trunk/iocore/utils/MTInteractor.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/utils/MTInteractor.cc?rev=982072&r1=982071&r2=982072&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/utils/MTInteractor.cc (original)
+++ trafficserver/traffic/trunk/iocore/utils/MTInteractor.cc Tue Aug  3 23:22:04 2010
@@ -157,10 +157,14 @@ MTClient::handleAttaching(int event, voi
 int
 MTClient::handleAttached(int event, void *data)
 {
+  NOWARN_UNUSED(event);
+  NOWARN_UNUSED(data);
   return EVENT_CONT;
-};
+}
 int
 MTClient::handleDetached(int event, void *data)
 {
+  NOWARN_UNUSED(event);
+  NOWARN_UNUSED(data);
   return EVENT_CONT;
-};
+}

Modified: trafficserver/traffic/trunk/iocore/utils/Machine.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/utils/Machine.cc?rev=982072&r1=982071&r2=982072&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/utils/Machine.cc (original)
+++ trafficserver/traffic/trunk/iocore/utils/Machine.cc Tue Aug  3 23:22:04 2010
@@ -96,7 +96,7 @@ ip(aip)
     *(uint32 *) & x = (uint32) ip;
     const size_t ip_string_size = sizeof(char) * 16;
     ip_string = (char *) xmalloc(ip_string_size);
-    snprintf(ip_string, ip_string_size, "%u.%u.%u.%u", x[0], x[1], x[2], x[3]);
+    snprintf(ip_string, ip_string_size, "%hu.%hu.%hu.%hu", x[0], x[1], x[2], x[3]);
   }
 }
 

Modified: trafficserver/traffic/trunk/libinktomi++/ink_queue.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/libinktomi%2B%2B/ink_queue.cc?rev=982072&r1=982071&r2=982072&view=diff
==============================================================================
--- trafficserver/traffic/trunk/libinktomi++/ink_queue.cc (original)
+++ trafficserver/traffic/trunk/libinktomi++/ink_queue.cc Tue Aug  3 23:22:04 2010
@@ -482,7 +482,7 @@ ink_freelists_dump_baselinerel(FILE * f)
   while (fll) {
     int a = fll->fl->allocated - fll->fl->allocated_base;
     if (a != 0) {
-      fprintf(f, " % 10u | % 10u | % 7u | % 10u | memory/%s\n",
+      fprintf(f, " %10u | %10u | %7u | %10u | memory/%s\n",
               (fll->fl->allocated - fll->fl->allocated_base) * fll->fl->type_size,
               (fll->fl->count - fll->fl->count_base) * fll->fl->type_size,
               fll->fl->count - fll->fl->count_base, fll->fl->type_size,
fll->fl->name ? fll->fl->name : "<unknown>");
@@ -503,7 +503,7 @@ ink_freelists_dump(FILE * f)
 
   fll = freelists;
   while (fll) {
-    fprintf(f, " % 10u | % 10u | % 10u | memory/%s\n",
+    fprintf(f, " %10u | %10u | %10u | memory/%s\n",
             fll->fl->allocated * fll->fl->type_size,
             fll->fl->count * fll->fl->type_size, fll->fl->type_size, fll->fl->name
? fll->fl->name : "<unknown>");
     fll = fll->next;

Modified: trafficserver/traffic/trunk/proxy/RegressionSM.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/RegressionSM.h?rev=982072&r1=982071&r2=982072&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/RegressionSM.h (original)
+++ trafficserver/traffic/trunk/proxy/RegressionSM.h Tue Aug  3 23:22:04 2010
@@ -32,7 +32,7 @@
   See RegressionSM.cc at the end for an example
 */
 
-struct RegressionSM : Continuation {
+struct RegressionSM :  public Continuation {
 
   RegressionTest *t; // for use with rprint
 

Modified: trafficserver/traffic/trunk/proxy/api/ts/ts.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/api/ts/ts.h?rev=982072&r1=982071&r2=982072&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/api/ts/ts.h (original)
+++ trafficserver/traffic/trunk/proxy/api/ts/ts.h Tue Aug  3 23:22:04 2010
@@ -440,7 +440,7 @@ extern "C"
    */
   typedef enum
   {
-    INK_SDK_VERSION_2_0 = 0,
+    INK_SDK_VERSION_2_0 = 0
   } INKSDKVersion;
 
   typedef enum

Modified: trafficserver/traffic/trunk/proxy/congest/Congestion.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/congest/Congestion.h?rev=982072&r1=982071&r2=982072&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/congest/Congestion.h (original)
+++ trafficserver/traffic/trunk/proxy/congest/Congestion.h Tue Aug  3 23:22:04 2010
@@ -201,7 +201,7 @@ struct FailHistory
 };
 
 
-struct CongestionEntry:RequestData
+struct CongestionEntry: public RequestData
 {
   // key in the hash table;
   uint64 m_key;



Mime
View raw message