You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2010/08/04 01:22:48 UTC

svn commit: r982079 - in /trafficserver/traffic/trunk/proxy: ./ mgmt2/ mgmt2/api2/ mgmt2/cli2/

Author: zwoop
Date: Tue Aug  3 23:22:48 2010
New Revision: 982079

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

Modified:
    trafficserver/traffic/trunk/proxy/CacheControl.cc
    trafficserver/traffic/trunk/proxy/CacheInspectorAllow.cc
    trafficserver/traffic/trunk/proxy/ControlBase.cc
    trafficserver/traffic/trunk/proxy/CoreUtils.cc
    trafficserver/traffic/trunk/proxy/Error.cc
    trafficserver/traffic/trunk/proxy/ProxyConfig.cc
    trafficserver/traffic/trunk/proxy/mgmt2/AutoConf.cc
    trafficserver/traffic/trunk/proxy/mgmt2/BaseRecords.cc
    trafficserver/traffic/trunk/proxy/mgmt2/FileManager.cc
    trafficserver/traffic/trunk/proxy/mgmt2/LocalManager.cc
    trafficserver/traffic/trunk/proxy/mgmt2/Main.cc
    trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.cc
    trafficserver/traffic/trunk/proxy/mgmt2/StatAggregation.cc
    trafficserver/traffic/trunk/proxy/mgmt2/api2/EventControlMain.cc
    trafficserver/traffic/trunk/proxy/mgmt2/api2/MgmtPlugin.cc
    trafficserver/traffic/trunk/proxy/mgmt2/api2/TSControlMain.cc
    trafficserver/traffic/trunk/proxy/mgmt2/cli2/UtilCmds.cc
    trafficserver/traffic/trunk/proxy/mgmt2/cli2/cliMain.cc

Modified: trafficserver/traffic/trunk/proxy/CacheControl.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/CacheControl.cc?rev=982079&r1=982078&r2=982079&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/CacheControl.cc (original)
+++ trafficserver/traffic/trunk/proxy/CacheControl.cc Tue Aug  3 23:22:48 2010
@@ -84,7 +84,7 @@ CC_delete_table()
 //
 struct CC_FreerContinuation;
 typedef int (CC_FreerContinuation::*CC_FreerContHandler) (int, void *);
-struct CC_FreerContinuation:Continuation
+struct CC_FreerContinuation: public Continuation
 {
   CC_table *p;
   int freeEvent(int event, Event * e)
@@ -108,7 +108,7 @@ struct CC_FreerContinuation:Continuation
 //   Used to read the cache.conf file after the manager signals
 //      a change
 //
-struct CC_UpdateContinuation:Continuation
+struct CC_UpdateContinuation: public Continuation
 {
   int file_update_handler(int etype, void *data)
   {
@@ -127,6 +127,10 @@ struct CC_UpdateContinuation:Continuatio
 int
 cacheControlFile_CB(const char *name, RecDataT data_type, RecData data, void *cookie)
 {
+  NOWARN_UNUSED(name);
+  NOWARN_UNUSED(data_type);
+  NOWARN_UNUSED(data);
+  NOWARN_UNUSED(cookie);
   eventProcessor.schedule_imm(NEW(new CC_UpdateContinuation(reconfig_mutex)), ET_CACHE);
   return 0;
 }

Modified: trafficserver/traffic/trunk/proxy/CacheInspectorAllow.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/CacheInspectorAllow.cc?rev=982079&r1=982078&r2=982079&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/CacheInspectorAllow.cc (original)
+++ trafficserver/traffic/trunk/proxy/CacheInspectorAllow.cc Tue Aug  3 23:22:48 2010
@@ -47,7 +47,7 @@ Ptr<ProxyMutex> cache_inspector_reconfig
 //
 struct CacheInspectorAllow_FreerContinuation;
 typedef int (CacheInspectorAllow_FreerContinuation::*CacheInspectorAllow_FrContHandler) (int, void *);
-struct CacheInspectorAllow_FreerContinuation:Continuation
+struct CacheInspectorAllow_FreerContinuation: public Continuation
 {
   CacheInspectorAllow *p;
   int freeEvent(int event, Event * e)
@@ -70,7 +70,7 @@ struct CacheInspectorAllow_FreerContinua
 //   Used to read the ip_allow.conf file after the manager signals
 //      a change
 //
-struct CacheInspectorAllow_UpdateContinuation:Continuation
+struct CacheInspectorAllow_UpdateContinuation: public Continuation
 {
   int file_update_handler(int etype, void *data)
   {
@@ -92,9 +92,10 @@ struct CacheInspectorAllow_UpdateContinu
 int
 CacheInspectorAllowFile_CB(const char *config_name, RecDataT type, RecData data, void *cookie)
 {
-  NOWARN_UNUSED(cookie);
-  NOWARN_UNUSED(type);
   NOWARN_UNUSED(config_name);
+  NOWARN_UNUSED(type);
+  NOWARN_UNUSED(data);
+  NOWARN_UNUSED(cookie);
 
   eventProcessor.schedule_imm(NEW(new CacheInspectorAllow_UpdateContinuation(cache_inspector_reconfig_mutex)),
                               ET_CACHE);

Modified: trafficserver/traffic/trunk/proxy/ControlBase.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/ControlBase.cc?rev=982079&r1=982078&r2=982079&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/ControlBase.cc (original)
+++ trafficserver/traffic/trunk/proxy/ControlBase.cc Tue Aug  3 23:22:48 2010
@@ -58,8 +58,6 @@ static const char *ModTypeStrings[] = {
   "Tag"
 };
 
-const int secondsInDay = 24 * 60 * 60;
-
 struct timeMod
 {
   time_t start_time;
@@ -371,7 +369,7 @@ ControlBase::ProcessModifiers(matcher_li
       }
     } else if (strcasecmp(label, "iport") == 0) {
       // coverity[secure_coding]
-      if (sscanf(val, "%d", &tmp) == 1) {
+      if (sscanf(val, "%u", &tmp) == 1) {
         cur_el.type = MOD_IPORT;
         cur_el.opaque_data = (void *)(uintptr_t)tmp;
       } else {

Modified: trafficserver/traffic/trunk/proxy/CoreUtils.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/CoreUtils.cc?rev=982079&r1=982078&r2=982079&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/CoreUtils.cc (original)
+++ trafficserver/traffic/trunk/proxy/CoreUtils.cc Tue Aug  3 23:22:48 2010
@@ -214,10 +214,13 @@ CoreUtils::find_vaddr(intptr_t vaddr, in
 void
 CoreUtils::insert_table(intptr_t vaddr1, intptr_t offset1, intptr_t fsize1)
 {
+  // TODO: What was this intended for??
+#if 0
   memTable m;
   m.vaddr = vaddr1;
   m.offset = offset1;
   m.fsize = fsize1;
+#endif
 
   if (arrayMem.length() == 0) {
     arrayMem(0);

Modified: trafficserver/traffic/trunk/proxy/Error.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Error.cc?rev=982079&r1=982078&r2=982079&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Error.cc (original)
+++ trafficserver/traffic/trunk/proxy/Error.cc Tue Aug  3 23:22:48 2010
@@ -55,6 +55,7 @@ ErrorClass::operator() (const char *afor
 void
 ErrorClass::raise(va_list ap, const char *prefix)
 {
+  NOWARN_UNUSED(prefix);
   SrcLoc loc;
   loc.set(filename, function_name, line_number);
   diags->print_va(NULL, DL_Fatal, NULL, &loc, format_string, ap);

Modified: trafficserver/traffic/trunk/proxy/ProxyConfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/ProxyConfig.cc?rev=982079&r1=982078&r2=982079&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/ProxyConfig.cc (original)
+++ trafficserver/traffic/trunk/proxy/ProxyConfig.cc Tue Aug  3 23:22:48 2010
@@ -102,6 +102,8 @@ public:
 
   int handle_event(int event, void *edata)
   {
+    NOWARN_UNUSED(event);
+    NOWARN_UNUSED(edata);
     configProcessor.release(m_id, m_info);
     delete this;
     return 0;

Modified: trafficserver/traffic/trunk/proxy/mgmt2/AutoConf.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/AutoConf.cc?rev=982079&r1=982078&r2=982079&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/AutoConf.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/AutoConf.cc Tue Aug  3 23:22:48 2010
@@ -59,7 +59,6 @@ static const char checkDomain[] = "dnsDo
 static const char checkHost[] = "localHostOrDomainIs(host, \"";
 static const char directResponse[] = "\t\treturn \"DIRECT\";\n\t}\n\n";
 static const char returnStr[] = "\n\treturn ";
-static const char proxyName[] = "ink-proxy.inktomi.com";
 static const char proxyStr[] = "\"PROXY ";
 static const char directStr[] = "\"DIRECT\";";
 
@@ -254,7 +253,6 @@ AutoConf::handleView(textBuffer * output
   RollBackCodes r;
   Rollback *pacRoll = NULL;
   // following used to get modified times of 'proxy.pac'
-  bool pacFile = false;
   struct stat fileInfo;
   char dateBuf[64];
 
@@ -273,7 +271,7 @@ AutoConf::handleView(textBuffer * output
       // get modified time of 'proxy.pac' file
       if (pacRoll->statVersion(ACTIVE_VERSION, &fileInfo) == 0) {
         if (fileInfo.st_size > 0) {
-          pacFile = true;
+          // TODO: Huh, no-op?
         }
       }
 

Modified: trafficserver/traffic/trunk/proxy/mgmt2/BaseRecords.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/BaseRecords.cc?rev=982079&r1=982078&r2=982079&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/BaseRecords.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/BaseRecords.cc Tue Aug  3 23:22:48 2010
@@ -83,6 +83,7 @@ destroyRecords(Records * to_destroy)
 
 BaseRecords::BaseRecords(char *mpath, const char *cfile, char *efile)
 {
+  NOWARN_UNUSED(mpath);
   char fpath[PATH_NAME_MAX];
   InkHashTableEntry *hash_entry;
   InkHashTableIteratorState hash_iterator_state;
@@ -220,7 +221,6 @@ validate_line(char *buf, int cur_line, c
 {
   char *s;
   char *e;
-  int rectype;
   int type;
 
   s = buf;
@@ -238,15 +238,15 @@ validate_line(char *buf, int cur_line, c
   }
 
   if (mystrcmp(s, e, "CONFIG")) {
-    rectype = 1;
+    // TODO: no-op?
   } else if (mystrcmp(s, e, "PROCESS")) {
-    rectype = 2;
+    // TODO: no-op?
   } else if (mystrcmp(s, e, "NODE")) {
-    rectype = 3;
+    // TODO: no-op?
   } else if (mystrcmp(s, e, "CLUSTER")) {
-    rectype = 4;
+    // TODO: no-op?
   } else if (mystrcmp(s, e, "LOCAL")) {
-    rectype = 5;
+    // TODO: no-op?
   } else {
     goto error;
   }
@@ -476,7 +476,6 @@ BaseRecords::defineRecords()
 int
 BaseRecords::rereadRecordFile(char *path, char *f, bool dirty)
 {
-  int r;
   int cur_line = 0;
   char *param, line[1024], fname[1024];
   bool valid = true, found = false;
@@ -519,7 +518,7 @@ BaseRecords::rereadRecordFile(char *path
 
   // find all of the required user-override records
   required_records_ht = new MgmtHashTable("required_records_ht", false, InkHashTableKeyType_String);
-  for (r = 0; RecordsConfig[r].value_type != INVALID; r++) {
+  for (int r = 0; RecordsConfig[r].value_type != INVALID; r++) {
     if (RecordsConfig[r].required == RR_REQUIRED) {
       const char *name = RecordsConfig[r].name;
       required_records_ht->mgmt_hash_table_insert(name, (void*)name);
@@ -527,7 +526,6 @@ BaseRecords::rereadRecordFile(char *path
   }
 
   while (fgets(line, 1024, fin)) {
-
     cur_line++;
 
     if (!validate_line(line, cur_line, fname)) {
@@ -543,24 +541,22 @@ BaseRecords::rereadRecordFile(char *path
       continue;
     } else {
       char var_name[1024];
-      RecordType rtype;
       RecDataT mtype = RECD_INT;        /* Safe since valid will fall out, c. warning fix */
 
       param = strtok(ltrimmed_line, " ");
       for (int i = 0; param != NULL && valid; i++) {
-
         switch (i) {
         case 0:                /* RECORD TYPE */
           if (strcmp("CONFIG", param) == 0) {
-            rtype = CONFIG;
+            // TODO: Should it really be no-op here?
           } else if (strcmp("PROCESS", param) == 0) {
-            rtype = PROCESS;
+            // TODO: Should it really be no-op here?
           } else if (strcmp("NODE", param) == 0) {
-            rtype = NODE;
+            // TODO: Should it really be no-op here?
           } else if (strcmp("CLUSTER", param) == 0) {
-            rtype = CLUSTER;
+            // TODO: Should it really be no-op here?
           } else if (strcmp("LOCAL", param) == 0) {
-            rtype = LOCAL;
+            // TODO: Should it really be no-op here?
           } else {
             valid = false;
           }
@@ -644,14 +640,11 @@ BaseRecords::rereadRecordFile(char *path
               break;
             }
           case RECD_STRING:{
-              // INKqa07904: Trailing blanks break records.config
-              int i;
-              for (i = strlen(param) - 1; i >= 0; i--)
-                if (isspace(param[i]))
-                  param[i] = '\0';
+              for (int j = strlen(param) - 1; j >= 0; j--)
+                if (isspace(param[j]))
+                  param[j] = '\0';
                 else
                   break;
-              // end of INKqa07904
               RecString tmp;
               int rec_err = RecGetRecordString_Xmalloc(var_name, &tmp);
               found = (rec_err == REC_ERR_OKAY);

Modified: trafficserver/traffic/trunk/proxy/mgmt2/FileManager.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/FileManager.cc?rev=982079&r1=982078&r2=982079&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/FileManager.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/FileManager.cc Tue Aug  3 23:22:48 2010
@@ -562,7 +562,6 @@ FileManager::takeSnap(const char *snapNa
   InkHashTableIteratorState iterator_state;
   char *snapPath;
   SnapResult callResult = SNAP_OK;
-  int ret_val = 0;
   struct stat snapDirStat;
 
 
@@ -589,7 +588,7 @@ FileManager::takeSnap(const char *snapNa
     }
   }
 #ifndef _WIN32
-  if ((ret_val = mkdir(snapPath, DIR_MODE)) < 0) {
+  if (mkdir(snapPath, DIR_MODE) < 0) {
 #else
   if (mkdir(snapPath) < 0) {
 #endif

Modified: trafficserver/traffic/trunk/proxy/mgmt2/LocalManager.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/LocalManager.cc?rev=982079&r1=982078&r2=982079&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/LocalManager.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/LocalManager.cc Tue Aug  3 23:22:48 2010
@@ -49,6 +49,9 @@ int bindProxyPort(int, in_addr_t, int);
 bool
 LocalManager::SetForDup(void *hIOCPort, long lTProcId, void *hTh)
 {
+  NOWARN_UNUSED(hIOCPort);
+  NOWARN_UNUSED(lTProcId);
+  NOWARN_UNUSED(hTh);
   return true;
 }
 
@@ -237,6 +240,7 @@ LocalManager::processRunning()
 LocalManager::LocalManager(char *mpath, LMRecords * rd, bool proxy_on):
 BaseManager(), run_proxy(proxy_on), record_data(rd)
 {
+  NOWARN_UNUSED(mpath);
   bool found;
 #ifdef MGMT_USE_SYSLOG
   syslog_facility = 0;

Modified: trafficserver/traffic/trunk/proxy/mgmt2/Main.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/Main.cc?rev=982079&r1=982078&r2=982079&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/Main.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/Main.cc Tue Aug  3 23:22:48 2010
@@ -378,6 +378,7 @@ chdir_root()
 static rlim_t
 max_out_limit(const char *name, int which, bool max_it = true, bool unlim_it = true)
 {
+  NOWARN_UNUSED(name);
   struct rlimit rl;
 
 #if defined(linux)
@@ -469,8 +470,9 @@ main(int argc, char **argv)
   bool found = false;
   int just_started = 0;
   int cluster_port = -1, cluster_server_port = -1;
-  int dump_config = 0, dump_process = 0, dump_node = 0, proxy_port = -1;
-  int dump_cluster = 0, dump_local = 0, proxy_backdoor = -1;
+  // TODO: This seems completely incomplete, disabled for now
+  //  int dump_config = 0, dump_process = 0, dump_node = 0, dump_cluster = 0, dump_local = 0;
+  int proxy_port = -1, proxy_backdoor = -1;
   char *envVar = NULL, *group_addr = NULL, *tsArgs = NULL;
   bool log_to_syslog = true;
   char userToRunAs[80];
@@ -567,6 +569,8 @@ main(int argc, char **argv)
           } else if (strcmp(argv[i], "-recordsConf") == 0) {
             ++i;
             recs_conf = argv[i];
+            // TODO: This seems completely incomplete, disabled for now
+#if 0
           } else if (strcmp(argv[i], "-printRecords") == 0) {
             ++i;
             while (i < argc && argv[i][0] != '-') {
@@ -586,6 +590,7 @@ main(int argc, char **argv)
               ++i;
             }
             --i;
+#endif
           } else if (strcmp(argv[i], "-tsArgs") == 0) {
             int size_of_args = 0, j = (++i);
             while (j < argc) {
@@ -836,9 +841,7 @@ main(int argc, char **argv)
     XMLDom schema;
     schema.LoadFile(schema_path);
     bool validate = validateRecordsConfig(&schema);
-    NOWARN_UNUSED(validate);
-    // Why is this assert disabled? /leif
-    //ink_assert(validate);
+    ink_release_assert(validate);
   }
 
 
@@ -1087,6 +1090,7 @@ void
 SignalAlrmHandler(int sig)
 #endif
 {
+  NOWARN_UNUSED(sig);
   /*
      fprintf(stderr,"[TrafficManager] ==> SIGALRM received\n");
      mgmt_elog(stderr,"[TrafficManager] ==> SIGALRM received\n");
@@ -1212,6 +1216,7 @@ SignalHandler(int sig)
 void
 SigChldHandler(int sig)
 {
+  NOWARN_UNUSED(sig);
 }
 
 // void SigHupHandler(int sig,...)
@@ -1259,7 +1264,8 @@ printUsage()
      "     -lmConf        <fname> Local Management config file.\n");
    */
   fprintf(stderr, "     -recordsConf   <fname> General config file.\n");
-  fprintf(stderr, "     -printRecords  [...]   Print flags, default all are off.\n");
+  // TODO: This seems completely incomplete, disabled for now
+  // fprintf(stderr, "     -printRecords  [...]   Print flags, default all are off.\n");
   fprintf(stderr, "     -debug         <tags>  Enable the given debug tags\n");
   fprintf(stderr, "     -action        <tags>  Enable the given action tags.\n");
   fprintf(stderr, "     -version or -V         Print version id and exit.\n");

Modified: trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.cc?rev=982079&r1=982078&r2=982079&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.cc Tue Aug  3 23:22:48 2010
@@ -84,6 +84,7 @@ startProcessManager(void *arg)
 ProcessManager::ProcessManager(bool rlm, char *mpath, ProcessRecords * rd):
 BaseManager(), require_lm(rlm), mgmt_sync_key(0), record_data(rd), local_manager_sockfd(0)
 {
+  NOWARN_UNUSED(mpath);
   ink_strncpy(pserver_path, Layout::get()->runtimedir, sizeof(pserver_path));
   mgmt_signal_queue = create_queue();
 
@@ -105,17 +106,12 @@ void
 ProcessManager::reconfigure()
 {
   bool found;
-  int enable_mgmt_port = 0;
-  timeout = (int)
-    REC_readInteger("proxy.config.process_manager.timeout", &found);
-  timeout = 5;
-  ink_assert(found);
-
-  enable_mgmt_port = (int)
-    REC_readInteger("proxy.config.process_manager.enable_mgmt_port", &found);
+  timeout = REC_readInteger("proxy.config.process_manager.timeout", &found);
   ink_assert(found);
 
 #ifdef DEBUG_MGMT
+  int enable_mgmt_port = REC_readInteger("proxy.config.process_manager.enable_mgmt_port", &found);
+  ink_assert(found);
   if (enable_mgmt_port) {
     ink_thread_create(drainBackDoor, 0);
   }

Modified: trafficserver/traffic/trunk/proxy/mgmt2/StatAggregation.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/StatAggregation.cc?rev=982079&r1=982078&r2=982079&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/StatAggregation.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/StatAggregation.cc Tue Aug  3 23:22:48 2010
@@ -266,10 +266,10 @@ Ag_cacheHits()
     }
 
     for (i = 0; miss_count_table[i].lm_record_name; i++) {
-      int status;
       miss_count_table[i].current_value = -10000;
       miss_count_table[i].current_time = ink_get_hrtime();
-      status = varIntFromName(miss_count_table[i].lm_record_name, &(miss_count_table[i].current_value));
+      // TODO: Check return value?
+      varIntFromName(miss_count_table[i].lm_record_name, &(miss_count_table[i].current_value));
     }
 
     ////////////////////////////////////////////////
@@ -366,7 +366,6 @@ Ag_HostdbHitRate()
   static StatTwoIntSamples node_hostdb_hits = { "proxy.process.hostdb.total_hits", 0, 0, 0, 0 };
   static const char *node_hostdb_total_lookups_name = "proxy.node.hostdb.total_lookups_avg_10s";
   static const char *node_hostdb_hits_name = "proxy.node.hostdb.total_hits_avg_10s";
-  int status;
   MgmtInt hostdbHits;
   MgmtInt hostdbLookups;
   MgmtFloat floatSum = -20;
@@ -399,11 +398,13 @@ Ag_HostdbHitRate()
     //////////////////////////
     node_hostdb_total_lookups.current_value = -10000;
     node_hostdb_total_lookups.current_time = ink_get_hrtime();
-    status = varIntFromName(node_hostdb_total_lookups.lm_record_name, &(node_hostdb_total_lookups.current_value));
+    // TODO: Check return value?
+    varIntFromName(node_hostdb_total_lookups.lm_record_name, &(node_hostdb_total_lookups.current_value));
 
     node_hostdb_hits.current_value = -10000;
     node_hostdb_hits.current_time = ink_get_hrtime();
-    status = varIntFromName(node_hostdb_hits.lm_record_name, &(node_hostdb_hits.current_value));
+    // TODO: Check return value?
+    varIntFromName(node_hostdb_hits.lm_record_name, &(node_hostdb_hits.current_value));
 
     ////////////////////////////////////////////////
     // if not initial or wrap, set derived values //
@@ -620,16 +621,16 @@ Ag_TransactionPercentsAndMeanTimes()
     //////////////////////////
 
     for (i = 0; count_table[i].lm_record_name; i++) {
-      int status;
       count_table[i].current_value = -10000;
       count_table[i].current_time = ink_get_hrtime();
-      status = varIntFromName(count_table[i].lm_record_name, &(count_table[i].current_value));
+      // TODO: Check return value
+      varIntFromName(count_table[i].lm_record_name, &(count_table[i].current_value));
     }
     for (i = 0; times_table[i].lm_record_name; i++) {
-      int status;
       times_table[i].current_value = -10000;
       times_table[i].current_time = ink_get_hrtime();
-      status = varFloatFromName(times_table[i].lm_record_name, &(times_table[i].current_value));
+      // TODO: Check return value
+      varFloatFromName(times_table[i].lm_record_name, &(times_table[i].current_value));
     }
 
     ////////////////////////////////////////////////
@@ -675,17 +676,8 @@ void
 Ag_Throughput()
 {
   const ink_hrtime window = 10 * HRTIME_SECOND; // update every 10 seconds
-  static StatTwoIntSamples node_http_user_agent_total_response_bytes =
-    { "proxy.node.http.user_agent_total_response_bytes", 0, 0, 0, 0 };
-  static StatTwoIntSamples node_rni_downstream_total_bytes = { "proxy.node.rni.downstream_total_bytes", 0, 0, 0, 0 };
-  static const char *node_http_ua_total_response_bytes_name = "proxy.node.http.user_agent_total_response_bytesavg_10s";
-  static const char *node_rni_downstream_total_bytes_name = "proxy.node.rni.downstream_total_bytes_avg_10s";
   static ink_hrtime lastThroughputTime = 0;
   static MgmtInt lastBytesThrough = 0;
-  // These aren't used.
-  //static MgmtInt lastBytesHttpUAThrough;
-  //static MgmtInt lastBytesHttpOSThrough;
-  //static MgmtInt lastBytesRNIUAThrough;
   MgmtInt bytesThrough;
   MgmtInt bytesHttpUAThrough;
   MgmtInt bytesHttpOSThrough;
@@ -698,12 +690,6 @@ Ag_Throughput()
   MgmtInt intSum;
   MgmtFloat floatSum = -20.0;
 
-  // Avoid warnings, we might want to clear out some of these variables ... /leif.
-  NOWARN_UNUSED(node_http_user_agent_total_response_bytes);
-  NOWARN_UNUSED(node_rni_downstream_total_bytes);
-  NOWARN_UNUSED(node_http_ua_total_response_bytes_name);
-  NOWARN_UNUSED(node_rni_downstream_total_bytes_name);
-
   if (diffTime > window) {
     if (varIntFromName("proxy.node.http.user_agent_total_response_bytes", &bytesHttpUAThrough)
         && varIntFromName("proxy.node.http.origin_server_total_response_bytes", &bytesHttpOSThrough)
@@ -941,7 +927,6 @@ Ag_Bytes()
   static StatTwoIntSamples node_os_total_bytes = { "proxy.node.origin_server_total_bytes", 0, 0, 0, 0 };
   static const char *node_ua_total_bytes_name = "proxy.node.user_agent_total_bytes_avg_10s";
   static const char *node_os_total_bytes_name = "proxy.node.origin_server_total_bytes_avg_10s";
-  int status;
   MgmtFloat hitRate;
 
   MgmtInt h, b;
@@ -1133,11 +1118,13 @@ Ag_Bytes()
     //////////////////////////
     node_ua_total_bytes.current_value = -10000;
     node_ua_total_bytes.current_time = ink_get_hrtime();
-    status = varIntFromName(node_ua_total_bytes.lm_record_name, &(node_ua_total_bytes.current_value));
+    // TODO: Check return value?
+    varIntFromName(node_ua_total_bytes.lm_record_name, &(node_ua_total_bytes.current_value));
 
     node_os_total_bytes.current_value = -10000;
     node_os_total_bytes.current_time = ink_get_hrtime();
-    status = varIntFromName(node_os_total_bytes.lm_record_name, &(node_os_total_bytes.current_value));
+    // TODO: Check return value?
+    varIntFromName(node_os_total_bytes.lm_record_name, &(node_os_total_bytes.current_value));
 
     ////////////////////////////////////////////////
     // if not initial or wrap, set derived values //

Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/EventControlMain.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/EventControlMain.cc?rev=982079&r1=982078&r2=982079&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/EventControlMain.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/EventControlMain.cc Tue Aug  3 23:22:48 2010
@@ -212,6 +212,7 @@ delete_event_queue(LLQ * q)
 void
 apiEventCallback(alarm_t newAlarm, char *ip, char *desc)
 {
+  NOWARN_UNUSED(ip);
   // create an INKEvent
   // addEvent(new_alarm, ip, desc) // adds event to mgmt_events
   INKEvent *newEvent;

Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/MgmtPlugin.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/MgmtPlugin.cc?rev=982079&r1=982078&r2=982079&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/MgmtPlugin.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/MgmtPlugin.cc Tue Aug  3 23:22:48 2010
@@ -107,6 +107,7 @@ dll_findsym(void *dlp, const char *name)
 static char *
 dll_error(void *dlp)
 {
+  NOWARN_UNUSED(dlp);
   return (char *) dlerror();
 }
 

Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/TSControlMain.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/TSControlMain.cc?rev=982079&r1=982078&r2=982079&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/TSControlMain.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/TSControlMain.cc Tue Aug  3 23:22:48 2010
@@ -1027,6 +1027,7 @@ Lerror:
 INKError
 handle_stats_reset(struct SocketInfo sock_info, char *req)
 {
+  NOWARN_UNUSED(req);
   INKError ret;
 
   // call CoreAPI call on Traffic Manager side

Modified: trafficserver/traffic/trunk/proxy/mgmt2/cli2/UtilCmds.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/cli2/UtilCmds.cc?rev=982079&r1=982078&r2=982079&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/cli2/UtilCmds.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/cli2/UtilCmds.cc Tue Aug  3 23:22:48 2010
@@ -32,6 +32,7 @@
 #include "createArgument.h"
 #include "CliMgmtUtils.h"
 #include "CliDisplay.h"
+#include "ink_defs.h"
 #include <unistd.h>
 #include <stdlib.h>
 #include <sys/types.h>
@@ -148,6 +149,7 @@ DebugOff()
 int
 Cmd_ConfigRoot(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
 {
+  NOWARN_UNUSED(clientData);
   /* call to processArgForCommand must appear at the beginning
    * of each command's callback function
    */

Modified: trafficserver/traffic/trunk/proxy/mgmt2/cli2/cliMain.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/cli2/cliMain.cc?rev=982079&r1=982078&r2=982079&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/cli2/cliMain.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/cli2/cliMain.cc Tue Aug  3 23:22:48 2010
@@ -98,6 +98,9 @@ main(int argc, char *argv[])
 void
 eventCallbackFn(char *name, char *msg, int pri, void *data)
 {
+  NOWARN_UNUSED(msg);
+  NOWARN_UNUSED(pri);
+  NOWARN_UNUSED(data);
   if (AlarmCallbackPrint == 1) {
     printf("\n**********\n" "ALARM SIGNALLED: %s\n" "**********\n", name);
   }
@@ -109,8 +112,6 @@ eventCallbackFn(char *name, char *msg, i
 void
 register_event_callback(void)
 {
-  INKError err;
-
-//  printf("\n[register_event_callback] \n");
-  err = INKEventSignalCbRegister(NULL, eventCallbackFn, NULL);
+  // TODO: Check return code?
+  INKEventSignalCbRegister(NULL, eventCallbackFn, NULL);
 }