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 2013/11/12 19:13:17 UTC
git commit: TS-2341: Cast TSHttpStatus to int to suppress compiler
warning in clang
Updated Branches:
refs/heads/master 6e52a1516 -> 8c635a6e0
TS-2341: Cast TSHttpStatus to int to suppress compiler warning in clang
Because TSHttpStatus is an enum and has a max value less than 599, comparing
<= of a variable of that type with a constant of that magnitude will always
return true. Casting to int removes that guarantee and thus the warning.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/8c635a6e
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/8c635a6e
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/8c635a6e
Branch: refs/heads/master
Commit: 8c635a6e05e607d227cc061715e2acbeb594bde6
Parents: 6e52a15
Author: Phil Sorber <so...@apache.org>
Authored: Tue Nov 12 11:04:08 2013 -0700
Committer: Phil Sorber <so...@apache.org>
Committed: Tue Nov 12 11:12:16 2013 -0700
----------------------------------------------------------------------
CHANGES | 2 ++
plugins/experimental/remap_stats/remap_stats.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8c635a6e/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index aa256dc..ee1576a 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,8 @@
Changes with Apache Traffic Server 4.2.0
+ *) [TS-2341] Cast TSHttpStatus to int to suppress compiler warning in clang
+
*) [TS-2303] Incorrect docs for negative_caching_enabled.
Author: Thomas Jackson <ja...@gmail.com>
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8c635a6e/plugins/experimental/remap_stats/remap_stats.c
----------------------------------------------------------------------
diff --git a/plugins/experimental/remap_stats/remap_stats.c b/plugins/experimental/remap_stats/remap_stats.c
index 9922ea8..246796f 100644
--- a/plugins/experimental/remap_stats/remap_stats.c
+++ b/plugins/experimental/remap_stats/remap_stats.c
@@ -227,7 +227,7 @@ handle_txn_close(TSCont cont, TSEvent event ATS_UNUSED, void *edata)
stat_name = create_stat_name(remap, "status_3xx");
else if ((status_code >= 400) && (status_code <= 499))
stat_name = create_stat_name(remap, "status_4xx");
- else if ((status_code >= 500) && (status_code <= 599))
+ else if ((status_code >= 500) && ((int)status_code <= 599))
stat_name = create_stat_name(remap, "status_5xx");
else
stat_name = create_stat_name(remap, "status_other");