You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by so...@apache.org on 2017/03/05 04:25:16 UTC
[trafficserver] 02/02: Cleans up ICC options, and some build issues
This is an automated email from the ASF dual-hosted git repository.
sorber pushed a commit to branch 6.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 357dd94985573991aa2543bb5bdeed00e0bbe5e8
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)
Conflicts:
iocore/eventsystem/P_IOBuffer.h
iocore/net/I_NetVConnection.h
iocore/net/P_UnixNetVConnection.h
iocore/net/UnixNetVConnection.cc
plugins/header_rewrite/condition.h
plugins/header_rewrite/operator.h
plugins/header_rewrite/ruleset.h
proxy/InkAPI.cc
proxy/api/ts/ts.h
proxy/http2/Http2Stream.h
---
configure.ac | 28 ++++++++--------------------
lib/ts/PriorityQueue.h | 4 ++--
lib/ts/signals.cc | 2 +-
plugins/experimental/balancer/hash.cc | 2 ++
plugins/header_rewrite/condition.h | 3 ++-
plugins/header_rewrite/operator.cc | 2 +-
plugins/header_rewrite/operator.h | 2 +-
plugins/header_rewrite/ruleset.h | 6 +++---
plugins/header_rewrite/statement.cc | 2 +-
plugins/header_rewrite/statement.h | 4 ++--
proxy/http2/Http2Stream.h | 5 +++--
11 files changed, 26 insertions(+), 34 deletions(-)
diff --git a/configure.ac b/configure.ac
index 31adfff..fc7bd6f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -795,24 +795,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"
@@ -1332,7 +1318,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([],[
@@ -1352,8 +1338,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/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 a90f114..6bb6c9b 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 d6a32f6..0fbb0d4 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 41a723d..2fb093d 100644
--- a/plugins/header_rewrite/condition.h
+++ b/plugins/header_rewrite/condition.h
@@ -98,7 +98,8 @@ 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 19db657..de136c8 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 d6190a7..d02eabc 100644
--- a/plugins/header_rewrite/operator.h
+++ b/plugins/header_rewrite/operator.h
@@ -53,7 +53,7 @@ public:
static_cast<Operator *>(_next)->do_exec(res);
}
- const OperModifiers get_oper_modifiers() const;
+ OperModifiers get_oper_modifiers() const;
virtual void initialize(Parser &p);
diff --git a/plugins/header_rewrite/ruleset.h b/plugins/header_rewrite/ruleset.h
index dd67ffa..2fb176f 100644
--- a/plugins/header_rewrite/ruleset.h
+++ b/plugins/header_rewrite/ruleset.h
@@ -66,14 +66,14 @@ public:
{
_hook = hook;
}
- const TSHttpHookID
+
+ TSHttpHookID
get_hook() const
{
return _hook;
}
- // Inline
- 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 59e76ac..8b68158 100644
--- a/plugins/header_rewrite/statement.cc
+++ b/plugins/header_rewrite/statement.cc
@@ -32,7 +32,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 b8dda6c..018a2d8 100644
--- a/plugins/header_rewrite/statement.h
+++ b/plugins/header_rewrite/statement.h
@@ -98,7 +98,7 @@ public:
// Which hook are we adding this statement to?
bool set_hook(TSHttpHookID hook);
- const TSHttpHookID
+ TSHttpHookID
get_hook() const
{
return _hook;
@@ -114,7 +114,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/http2/Http2Stream.h b/proxy/http2/Http2Stream.h
index 468bf46..d567080 100644
--- a/proxy/http2/Http2Stream.h
+++ b/proxy/http2/Http2Stream.h
@@ -106,12 +106,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>.