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 2017/02/28 17:24:35 UTC

[trafficserver] branch 7.1.x updated (959c2cc -> cebaa9c)

This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a change to branch 7.1.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git.

      from  959c2cc   Set nullptr to ua_session after it is destoryed
       new  a04686d   Fixes the type for a few overridables
       new  5676118   Cleans up ICC options, and some build issues
       new  cebaa9c   esi/combo_handler plugin doesn't register

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 configure.ac                          | 28 ++++++++--------------------
 iocore/eventsystem/P_IOBuffer.h       |  5 ++++-
 iocore/net/I_NetVConnection.h         |  2 +-
 iocore/net/P_UnixNetVConnection.h     |  2 +-
 iocore/net/UnixNetVConnection.cc      |  2 +-
 lib/ts/PriorityQueue.h                |  4 ++--
 lib/ts/signals.cc                     |  2 +-
 plugins/esi/combo_handler.cc          | 10 ++++++++++
 plugins/experimental/balancer/hash.cc |  2 ++
 plugins/header_rewrite/condition.h    |  2 +-
 plugins/header_rewrite/operator.cc    |  2 +-
 plugins/header_rewrite/operator.h     |  2 +-
 plugins/header_rewrite/ruleset.h      |  4 ++--
 plugins/header_rewrite/statement.cc   |  2 +-
 plugins/header_rewrite/statement.h    |  4 ++--
 proxy/InkAPI.cc                       |  5 +----
 proxy/api/ts/ts.h                     |  2 +-
 proxy/http2/Http2Stream.h             |  4 ++--
 18 files changed, 42 insertions(+), 42 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].

[trafficserver] 03/03: esi/combo_handler plugin doesn't register

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 7.1.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit cebaa9c17c29973c323c9e937f0cdea6a7bec1d6
Author: Daniel Xu <dl...@yahoo.com>
AuthorDate: Fri Feb 24 10:08:32 2017 -0600

    esi/combo_handler plugin doesn't register
    
    The plugin doesn't call TSPluginRegister. The causes ATS to crash upon
    startup if combo_handler is enabled.
    
    (cherry picked from commit 2724f48bd08a63558d88c5fbeeb0ba6a762c545f)
---
 plugins/esi/combo_handler.cc | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/plugins/esi/combo_handler.cc b/plugins/esi/combo_handler.cc
index 7ffa361..788498c 100644
--- a/plugins/esi/combo_handler.cc
+++ b/plugins/esi/combo_handler.cc
@@ -210,6 +210,16 @@ pthread_key_t threadKey = 0;
 void
 TSPluginInit(int argc, const char *argv[])
 {
+  TSPluginRegistrationInfo info;
+  info.plugin_name   = "combo_handler";
+  info.vendor_name   = "Apache Software Foundation";
+  info.support_email = "dev@trafficserver.apache.org";
+
+  if (TSPluginRegister(&info) != TS_SUCCESS) {
+    TSError("[combo_handler][%s] plugin registration failed.", __FUNCTION__);
+    return;
+  }
+
   if ((argc > 1) && (strcmp(argv[1], "-") != 0)) {
     COMBO_HANDLER_PATH = argv[1];
     if (COMBO_HANDLER_PATH == "/") {

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.

[trafficserver] 01/03: Fixes the type for a few overridables

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 7.1.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit a04686dcd2323f17473d1daecfe8081149e7fc2d
Author: Leif Hedstrom <le...@ogre.com>
AuthorDate: Fri Feb 17 18:56:50 2017 -0700

    Fixes the type for a few overridables
    
    These are all MgmtByte, so should not use the INT type here.
    
    (cherry picked from commit 09a351862f442e3341333dfa7ddad74c58937eb7)
---
 proxy/InkAPI.cc | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc
index c670298..42b0d1b 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -8100,7 +8100,6 @@ _conf_to_memberp(TSOverridableConfigKey conf, OverridableHttpConfigParams *overr
     ret = &overridableHttpConfig->body_factory_template_base;
     break;
   case TS_CONFIG_HTTP_CACHE_OPEN_WRITE_FAIL_ACTION:
-    typ = OVERRIDABLE_TYPE_INT;
     ret = &overridableHttpConfig->cache_open_write_fail_action;
     break;
   case TS_CONFIG_HTTP_ENABLE_REDIRECTION:
@@ -8149,11 +8148,9 @@ _conf_to_memberp(TSOverridableConfigKey conf, OverridableHttpConfigParams *overr
     ret = &overridableHttpConfig->transaction_active_timeout_in;
     break;
   case TS_CONFIG_SRV_ENABLED:
-    typ = OVERRIDABLE_TYPE_INT;
     ret = &overridableHttpConfig->srv_enabled;
     break;
   case TS_CONFIG_HTTP_FORWARD_CONNECT_METHOD:
-    typ = OVERRIDABLE_TYPE_INT;
     ret = &overridableHttpConfig->forward_connect_method;
     break;
   case TS_CONFIG_SSL_CERT_FILENAME:

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.

[trafficserver] 02/03: Cleans up ICC options, and some build issues

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 7.1.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit 5676118e13d8424a78b039230ec248a7a11d8069
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Wed Feb 15 11:45:34 2017 -0700

    Cleans up ICC options, and some build issues
    
    This removes a number of the previous warning exclusions that we
    we used to do. We then also have to clean up the core code in a
    few places, sometimes looking slightly odd (e.g. the meaningless
    const that we have in a few places).
    
    (cherry picked from commit 6bdc94e2747594e17161d3ed6a4c691d0fd49670)
---
 configure.ac                          | 28 ++++++++--------------------
 iocore/eventsystem/P_IOBuffer.h       |  5 ++++-
 iocore/net/I_NetVConnection.h         |  2 +-
 iocore/net/P_UnixNetVConnection.h     |  2 +-
 iocore/net/UnixNetVConnection.cc      |  2 +-
 lib/ts/PriorityQueue.h                |  4 ++--
 lib/ts/signals.cc                     |  2 +-
 plugins/experimental/balancer/hash.cc |  2 ++
 plugins/header_rewrite/condition.h    |  2 +-
 plugins/header_rewrite/operator.cc    |  2 +-
 plugins/header_rewrite/operator.h     |  2 +-
 plugins/header_rewrite/ruleset.h      |  4 ++--
 plugins/header_rewrite/statement.cc   |  2 +-
 plugins/header_rewrite/statement.h    |  4 ++--
 proxy/InkAPI.cc                       |  2 +-
 proxy/api/ts/ts.h                     |  2 +-
 proxy/http2/Http2Stream.h             |  4 ++--
 17 files changed, 32 insertions(+), 39 deletions(-)

diff --git a/configure.ac b/configure.ac
index 33b3e9e..dc11b37 100644
--- a/configure.ac
+++ b/configure.ac
@@ -770,24 +770,10 @@ AS_IF([test "x${has_optimizer_flags}" = "xno"],
 case $host_os_def in
   linux)
     AS_IF([test "x$ax_cv_c_compiler_vendor" = "xintel"], [
-      # -Wall goes crazy, so turned these specific checks off for now:
+      # -Wall is overzealous for us, so need to turn this off for now:
       #
-      #  111 is "statement is unreachable"
-      #  279 is "controlling expression is constant", triggered by our asserts
-      #  383 is "value copied to temporary, reference to temporary used"
-      #  444 is "destructor for base class is not virtual"
-      #  522 is "function "xyz" redeclared "inline" after being called
-      #  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"
-      # 1572 is "floating-point equality and inequality comparisons are unreliable"
-      # 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 -wd383 -wd522 -wd444 -wd873 -wd981 -wd1418 -wd1419 -wd1572 -wd1720 -wd2256 -wd2259"
+      #  #873 is "has no corresponding operator delete"
+      common_opt="-pipe -Wall -wd873"
       debug_opt="-ggdb3 $common_opt"
       release_opt="-g $common_opt $optimization_flags -axsse4.2 -fno-strict-aliasing"
       cxx_opt="-Wno-invalid-offsetof"
@@ -1330,7 +1316,7 @@ TS_TRY_COMPILE_NO_WARNING([],[
     has_128bit_cas=1
   ], [
     dnl If 128bit CAS fails, try again with the -mcx16 option. GCC needs this;
-    dnl clang doesn't; icc is unknown but presumed sane.
+    dnl clang doesn't; icc does not support -mcx16 (but gives a non-fatal warning).
     TS_ADDTO(CXXFLAGS, [-mcx16])
     TS_ADDTO(CFLAGS, [-mcx16])
     TS_TRY_COMPILE_NO_WARNING([],[
@@ -1350,8 +1336,10 @@ AC_LANG_POP
 AC_SUBST(has_128bit_cas)
 
 AS_IF([test "x$has_128bit_cas" = "x1"], [
-  TS_ADDTO(CFLAGS, [-mcx16])
-  TS_ADDTO(CXXFLAGS, [-mcx16])
+  AS_IF([test "x$ax_cv_c_compiler_vendor" != "xintel"], [
+    TS_ADDTO(CFLAGS, [-mcx16])
+    TS_ADDTO(CXXFLAGS, [-mcx16])
+  ])
 ])
 
 # Check for POSIX capabilities library.
diff --git a/iocore/eventsystem/P_IOBuffer.h b/iocore/eventsystem/P_IOBuffer.h
index 64fb6fb..dc29937 100644
--- a/iocore/eventsystem/P_IOBuffer.h
+++ b/iocore/eventsystem/P_IOBuffer.h
@@ -682,7 +682,8 @@ IOBufferReader::consume(int64_t n)
 
 TS_INLINE char &IOBufferReader::operator[](int64_t i)
 {
-  IOBufferBlock *b = block.get();
+  static char default_ret = '\0'; // This is just to avoid compiler warnings...
+  IOBufferBlock *b        = block.get();
 
   i += start_offset;
   while (b) {
@@ -694,6 +695,8 @@ TS_INLINE char &IOBufferReader::operator[](int64_t i)
   }
 
   ink_release_assert(!"out of range");
+  // Never used, just to satisfy compilers not undersatnding the fatality of ink_release_assert().
+  return default_ret;
 }
 
 TS_INLINE void
diff --git a/iocore/net/I_NetVConnection.h b/iocore/net/I_NetVConnection.h
index c772557..4b02516 100644
--- a/iocore/net/I_NetVConnection.h
+++ b/iocore/net/I_NetVConnection.h
@@ -260,7 +260,7 @@ class NetVConnection : public VConnection
 public:
   // How many bytes have been queued to the OS for sending by haven't been sent yet
   // Not all platforms support this, and if they don't we'll return -1 for them
-  virtual const int64_t
+  virtual int64_t
   outstanding()
   {
     return -1;
diff --git a/iocore/net/P_UnixNetVConnection.h b/iocore/net/P_UnixNetVConnection.h
index 0fa1411..edd0fbb 100644
--- a/iocore/net/P_UnixNetVConnection.h
+++ b/iocore/net/P_UnixNetVConnection.h
@@ -101,7 +101,7 @@ struct OOB_callback : public Continuation {
 class UnixNetVConnection : public NetVConnection
 {
 public:
-  virtual const int64_t outstanding();
+  virtual int64_t outstanding();
   virtual VIO *do_io_read(Continuation *c, int64_t nbytes, MIOBuffer *buf);
   virtual VIO *do_io_write(Continuation *c, int64_t nbytes, IOBufferReader *buf, bool owner = false);
 
diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc
index f96dadc..de27549 100644
--- a/iocore/net/UnixNetVConnection.cc
+++ b/iocore/net/UnixNetVConnection.cc
@@ -656,7 +656,7 @@ UnixNetVConnection::get_data(int id, void *data)
   }
 }
 
-const int64_t
+int64_t
 UnixNetVConnection::outstanding()
 {
   int n;
diff --git a/lib/ts/PriorityQueue.h b/lib/ts/PriorityQueue.h
index afae433..c0d2d11 100644
--- a/lib/ts/PriorityQueue.h
+++ b/lib/ts/PriorityQueue.h
@@ -47,7 +47,7 @@ template <typename T, class Comp = PriorityQueueLess<T>> class PriorityQueue
 public:
   PriorityQueue() {}
   ~PriorityQueue() {}
-  const bool empty();
+  bool empty();
   PriorityQueueEntry<T> *top();
   void pop();
   void push(PriorityQueueEntry<T> *);
@@ -72,7 +72,7 @@ PriorityQueue<T, Comp>::dump() const
 }
 
 template <typename T, typename Comp>
-const bool
+bool
 PriorityQueue<T, Comp>::empty()
 {
   return _v.length() == 0;
diff --git a/lib/ts/signals.cc b/lib/ts/signals.cc
index 1c19618..dba800c 100644
--- a/lib/ts/signals.cc
+++ b/lib/ts/signals.cc
@@ -46,7 +46,7 @@ signal_check_handler(int signal, signal_handler_t handler)
     sigact = (void *)oact.sa_sigaction;
   }
 
-  if (sigact != handler) {
+  if (sigact != (void *)handler) {
     Warning("handler for signal %d was %p, not %p as expected", signal, sigact, handler);
     return false;
   }
diff --git a/plugins/experimental/balancer/hash.cc b/plugins/experimental/balancer/hash.cc
index 1f9dc13..bc33bb3 100644
--- a/plugins/experimental/balancer/hash.cc
+++ b/plugins/experimental/balancer/hash.cc
@@ -43,6 +43,8 @@ sockaddrlen(const struct sockaddr *sa)
   default:
     TSReleaseAssert(0 && "unsupported socket type");
   }
+
+  return 0;
 }
 
 struct md5_key {
diff --git a/plugins/header_rewrite/condition.h b/plugins/header_rewrite/condition.h
index 84a9e04..bebeeb5 100644
--- a/plugins/header_rewrite/condition.h
+++ b/plugins/header_rewrite/condition.h
@@ -101,7 +101,7 @@ public:
     return _matcher;
   }
 
-  const MatcherOps
+  MatcherOps
   get_cond_op() const
   {
     return _cond_op;
diff --git a/plugins/header_rewrite/operator.cc b/plugins/header_rewrite/operator.cc
index 30de38d..1afab77 100644
--- a/plugins/header_rewrite/operator.cc
+++ b/plugins/header_rewrite/operator.cc
@@ -23,7 +23,7 @@
 #include "ts/ts.h"
 #include "operator.h"
 
-const OperModifiers
+OperModifiers
 Operator::get_oper_modifiers() const
 {
   if (_next) {
diff --git a/plugins/header_rewrite/operator.h b/plugins/header_rewrite/operator.h
index c20ce63..839b7b5 100644
--- a/plugins/header_rewrite/operator.h
+++ b/plugins/header_rewrite/operator.h
@@ -45,7 +45,7 @@ class Operator : public Statement
 {
 public:
   Operator() : _mods(OPER_NONE) { TSDebug(PLUGIN_NAME_DBG, "Calling CTOR for Operator"); }
-  const OperModifiers get_oper_modifiers() const;
+  OperModifiers get_oper_modifiers() const;
   virtual void initialize(Parser &p);
 
   void
diff --git a/plugins/header_rewrite/ruleset.h b/plugins/header_rewrite/ruleset.h
index 1497528..6212aba 100644
--- a/plugins/header_rewrite/ruleset.h
+++ b/plugins/header_rewrite/ruleset.h
@@ -68,13 +68,13 @@ public:
     _hook = hook;
   }
 
-  const TSHttpHookID
+  TSHttpHookID
   get_hook() const
   {
     return _hook;
   }
 
-  const ResourceIDs
+  ResourceIDs
   get_all_resource_ids() const
   {
     return _ids;
diff --git a/plugins/header_rewrite/statement.cc b/plugins/header_rewrite/statement.cc
index 07480c2..ee342dc 100644
--- a/plugins/header_rewrite/statement.cc
+++ b/plugins/header_rewrite/statement.cc
@@ -33,7 +33,7 @@ Statement::append(Statement *stmt)
   tmp->_next = stmt;
 }
 
-const ResourceIDs
+ResourceIDs
 Statement::get_resource_ids() const
 {
   const Statement *stmt = this;
diff --git a/plugins/header_rewrite/statement.h b/plugins/header_rewrite/statement.h
index ef32fa8..7aa627b 100644
--- a/plugins/header_rewrite/statement.h
+++ b/plugins/header_rewrite/statement.h
@@ -108,7 +108,7 @@ public:
 
   // Which hook are we adding this statement to?
   bool set_hook(TSHttpHookID hook);
-  const TSHttpHookID
+  TSHttpHookID
   get_hook() const
   {
     return _hook;
@@ -124,7 +124,7 @@ public:
   // Linked list.
   void append(Statement *stmt);
 
-  const ResourceIDs get_resource_ids() const;
+  ResourceIDs get_resource_ids() const;
 
   virtual void
   initialize(Parser &)
diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc
index 42b0d1b..aec0fd3 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -9254,7 +9254,7 @@ TSUuidInitialize(TSUuid uuid, TSUuidVersion v)
   return u->valid() ? TS_SUCCESS : TS_ERROR;
 }
 
-const TSUuid
+TSUuid
 TSProcessUuidGet(void)
 {
   Machine *machine = Machine::instance();
diff --git a/proxy/api/ts/ts.h b/proxy/api/ts/ts.h
index 128a4e3..4a73063 100644
--- a/proxy/api/ts/ts.h
+++ b/proxy/api/ts/ts.h
@@ -2412,7 +2412,7 @@ tsapi TSReturnCode TSUuidStringParse(TSUuid uuid, const char *uuid_str);
 tsapi TSReturnCode TSClientRequestUuidGet(TSHttpTxn txnp, char *uuid_str);
 
 /* Get the process global UUID, resets on every startup */
-tsapi const TSUuid TSProcessUuidGet(void);
+tsapi TSUuid TSProcessUuidGet(void);
 
 /**
    Returns the plugin_tag.
diff --git a/proxy/http2/Http2Stream.h b/proxy/http2/Http2Stream.h
index 121b91d..78f8da8 100644
--- a/proxy/http2/Http2Stream.h
+++ b/proxy/http2/Http2Stream.h
@@ -117,13 +117,13 @@ public:
     bytes_sent += num_bytes;
   }
 
-  const Http2StreamId
+  Http2StreamId
   get_id() const
   {
     return _id;
   }
 
-  const Http2StreamState
+  Http2StreamState
   get_state() const
   {
     return _state;

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.