trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpe...@apache.org
Subject git commit: Various clang build fixes
Date Tue, 02 Oct 2012 18:32:53 GMT
Updated Branches:
  refs/heads/master 6fb81ae94 -> e58f72c31


Various clang build fixes

Fix some unused variable and function warnings generated by
Apple/clang-422.1.13. Fix flex detection for Mac OS X.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/e58f72c3
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/e58f72c3
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/e58f72c3

Branch: refs/heads/master
Commit: e58f72c317de36f9bb51c350037db46dde2f1d51
Parents: 6fb81ae
Author: James Peach <jpeach@apache.org>
Authored: Tue Oct 2 11:26:26 2012 -0700
Committer: James Peach <jpeach@apple.com>
Committed: Tue Oct 2 11:27:53 2012 -0700

----------------------------------------------------------------------
 configure.ac                       |    2 +-
 iocore/cache/CacheHosting.cc       |    6 ++----
 iocore/cache/P_CacheHosting.h      |    6 ++----
 iocore/cluster/ClusterConfig.cc    |    1 -
 iocore/cluster/P_ClusterInternal.h |    1 -
 lib/wccp/Wccp.h                    |    4 ++--
 lib/wccp/WccpConfig.cc             |    4 ++++
 lib/wccp/WccpLocal.h               |    2 +-
 mgmt/api/GenericParser.cc          |    2 +-
 mgmt/api/GenericParser.h           |    1 -
 proxy/http/HttpUpdateTester.cc     |    7 ++++++-
 11 files changed, 19 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e58f72c3/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 7b05146..01e5ee8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -566,7 +566,7 @@ dnl but we need various other LEX values.
 AC_PROG_LEX
 AS_IF([test -n "$LEX"],
       [ flex_version_check=`$LEX --version 2>&1 | \
-        $SED -n '/flex/s/^[[^0-9]]*\([[0-9]][[0-9.]]*\)[[^0-9]]*$/\1/p' | \
+        $SED -n '/flex/s/^[[^0-9]]*\([[0-9]][[0-9.]]*\)[[^0-9]]*.*$/\1/p' | \
         $AWK "{ if (\\$1 > $FLEX_MAJOR || (\\$1 == $FLEX_MAJOR && (\\$2 > $FLEX_MINOR
|| (\\$2 == $FLEX_MINOR && (NR == 2 || \\$3 >= $FLEX_POINT))))) print \"yes\";
else printf(\"version %d.%d.%d\",\\$1,\\$2,\\$3); }" FS=. \
         `
         AS_IF([test "x$flex_version_check" != "xyes"],

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e58f72c3/iocore/cache/CacheHosting.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheHosting.cc b/iocore/cache/CacheHosting.cc
index 5017271..05b9014 100644
--- a/iocore/cache/CacheHosting.cc
+++ b/iocore/cache/CacheHosting.cc
@@ -37,12 +37,10 @@ bool alarmAlready = false;
  *   Begin class HostMatcher
  *************************************************************/
 
-CacheHostMatcher::CacheHostMatcher(const char *name, const char *filename, int typ):
+CacheHostMatcher::CacheHostMatcher(const char * name, int typ):
 data_array(NULL),
 array_len(-1),
 num_el(-1),
-matcher_name(name),
-file_name(filename),
 type(typ)
 {
   host_lookup = NEW(new HostLookup(name));
@@ -359,7 +357,7 @@ CacheHostTable::BuildTableFromString(char *file_buf)
   }
 
   if (hostDomain > 0) {
-    hostMatch = NEW(new CacheHostMatcher(matcher_name, config_file_path, type));
+    hostMatch = NEW(new CacheHostMatcher(matcher_name, type));
     hostMatch->AllocateSpace(hostDomain);
   }
   // Traverse the list and build the records table

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e58f72c3/iocore/cache/P_CacheHosting.h
----------------------------------------------------------------------
diff --git a/iocore/cache/P_CacheHosting.h b/iocore/cache/P_CacheHosting.h
index 871ba8f..043ed51 100644
--- a/iocore/cache/P_CacheHosting.h
+++ b/iocore/cache/P_CacheHosting.h
@@ -77,7 +77,7 @@ struct CacheHostResult
 class CacheHostMatcher
 {
 public:
-  CacheHostMatcher(const char *name, const char *filename, int typ);
+  CacheHostMatcher(const char * name, int typ);
   ~CacheHostMatcher();
 
   void Match(char *rdata, int rlen, CacheHostResult *result);
@@ -94,9 +94,7 @@ private:
   HostLookup *host_lookup;      // Data structure to do the lookups
   CacheHostRecord *data_array;  // array of all data items
   int array_len;                // the length of the arrays
-  int num_el;                   // the numbe of itmems in the tree
-  const char *matcher_name;     // Used for Debug/Warning/Error messages
-  const char *file_name;        // Used for Debug/Warning/Error messages
+  int num_el;                   // the number of itmems in the tree
   int type;
 };
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e58f72c3/iocore/cluster/ClusterConfig.cc
----------------------------------------------------------------------
diff --git a/iocore/cluster/ClusterConfig.cc b/iocore/cluster/ClusterConfig.cc
index 94a0c5f..7516609 100644
--- a/iocore/cluster/ClusterConfig.cc
+++ b/iocore/cluster/ClusterConfig.cc
@@ -36,7 +36,6 @@ ClusterAccept::ClusterAccept(int *port, int send_bufsize, int recv_bufsize)
     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)

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e58f72c3/iocore/cluster/P_ClusterInternal.h
----------------------------------------------------------------------
diff --git a/iocore/cluster/P_ClusterInternal.h b/iocore/cluster/P_ClusterInternal.h
index 49617a1..525459c 100644
--- a/iocore/cluster/P_ClusterInternal.h
+++ b/iocore/cluster/P_ClusterInternal.h
@@ -469,7 +469,6 @@ private:
   int *p_cluster_port;
   int socket_send_bufsize;
   int socket_recv_bufsize;
-  unsigned long socket_opt_flags;
   int current_cluster_port;
   Action *accept_action;
   Event *periodic_event;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e58f72c3/lib/wccp/Wccp.h
----------------------------------------------------------------------
diff --git a/lib/wccp/Wccp.h b/lib/wccp/Wccp.h
index b868c9a..7977529 100644
--- a/lib/wccp/Wccp.h
+++ b/lib/wccp/Wccp.h
@@ -46,10 +46,10 @@ class RouterImpl;
 namespace detail {
   /// Cache implementation details.
   namespace cache {
-    class GroupData;
+    struct GroupData;
   }
   namespace router {
-    class GroupData;
+    struct GroupData;
   }
 }
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e58f72c3/lib/wccp/WccpConfig.cc
----------------------------------------------------------------------
diff --git a/lib/wccp/WccpConfig.cc b/lib/wccp/WccpConfig.cc
index f24c438..e028b72 100644
--- a/lib/wccp/WccpConfig.cc
+++ b/lib/wccp/WccpConfig.cc
@@ -111,6 +111,7 @@ std::ostream& operator << ( std::ostream& out, ValueNamePrinter
const& v ) {
   return out;
 }
 
+#if 0 /* silence -Wunused-function */
 ts::Errata::Message File_Syntax_Error(int line, char const* text) {
   std::ostringstream out;
   out << "Service configuration error. Line "
@@ -127,6 +128,7 @@ ts::Errata::Message File_Read_Error(char const* text) {
     ;
   return ts::Errata::Message(2, LVL_FATAL, out.str());
 }
+#endif
 
 ts::Errata::Message Unable_To_Create_Service_Group(int line) {
   std::ostringstream out;
@@ -227,6 +229,7 @@ ts::Errata::Message Svc_Prop_Ignored(char const* name, int line) {
   return ts::Errata::Message(11, LVL_INFO, out.str());
 }
 
+#if 0 /* silence -Wunused-function */
 ts::Errata::Message Svc_Flags_No_Hash_Set(int line) {
   std::ostringstream out;
   out << "Service flags have no hash set at line " << line
@@ -241,6 +244,7 @@ ts::Errata::Message Svc_Flags_Ignored(int line) {
     ;
   return ts::Errata::Message(13, LVL_INFO, out.str());
 }
+#endif
 
 ts::Errata::Message Svc_Ports_Too_Many(int line, int n) {
   std::ostringstream out;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e58f72c3/lib/wccp/WccpLocal.h
----------------------------------------------------------------------
diff --git a/lib/wccp/WccpLocal.h b/lib/wccp/WccpLocal.h
index 6cc3d15..3430ccf 100644
--- a/lib/wccp/WccpLocal.h
+++ b/lib/wccp/WccpLocal.h
@@ -37,7 +37,7 @@ namespace wccp {
 namespace detail {
   class Assignment;
   namespace cache {
-    class RouterData;
+    struct RouterData;
   }
 }
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e58f72c3/mgmt/api/GenericParser.cc
----------------------------------------------------------------------
diff --git a/mgmt/api/GenericParser.cc b/mgmt/api/GenericParser.cc
index 574bdad..c2a7f46 100644
--- a/mgmt/api/GenericParser.cc
+++ b/mgmt/api/GenericParser.cc
@@ -139,7 +139,7 @@ TokenList::Print()
 
 Rule::Rule()
   : tokenList(NULL),
-    m_filetype(TS_FNAME_UNDEFINED), m_filename(NULL), m_ruleStr(NULL), m_comment(NULL), m_errorHint(NULL),
m_lineNum(0)
+    m_filetype(TS_FNAME_UNDEFINED), m_filename(NULL), m_ruleStr(NULL), m_comment(NULL), m_errorHint(NULL)
 {
 }
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e58f72c3/mgmt/api/GenericParser.h
----------------------------------------------------------------------
diff --git a/mgmt/api/GenericParser.h b/mgmt/api/GenericParser.h
index 8af0c5b..fca2f83 100644
--- a/mgmt/api/GenericParser.h
+++ b/mgmt/api/GenericParser.h
@@ -190,7 +190,6 @@ private:
   char *m_ruleStr;
   char *m_comment;
   char *m_errorHint;
-  unsigned m_lineNum;
 
   TokenList *cacheParse(char *rule, unsigned short minNumToken = MIN_CONFIG_TOKEN, unsigned
short maxNumToken = MAX_CONFIG_TOKEN);
   TokenList *congestionParse(char *rule, unsigned short minNumToken = MIN_CONFIG_TOKEN, unsigned
short maxNumToken = MAX_CONFIG_TOKEN);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e58f72c3/proxy/http/HttpUpdateTester.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpUpdateTester.cc b/proxy/http/HttpUpdateTester.cc
index b915bc1..c5c1829 100644
--- a/proxy/http/HttpUpdateTester.cc
+++ b/proxy/http/HttpUpdateTester.cc
@@ -37,12 +37,17 @@ public:
 private:
   void make_requests();
   int active_req;
+#ifdef GO_AWAY
   int total_req;
   FILE *file;
+#endif
 };
 
 UpTest::UpTest(FILE * f, ProxyMutex * amutex):
-Continuation(amutex), active_req(0), total_req(0), file(f)
+Continuation(amutex), active_req(0)
+#ifdef GO_AWAY
+  , total_req(0), file(f)
+#endif
 {
   SET_HANDLER(&UpTest::main_handler);
 }


Mime
View raw message