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 2014/04/14 21:52:49 UTC
git commit: TS-2715 Fix some ESI compile warnings
Repository: trafficserver
Updated Branches:
refs/heads/master b90a731d4 -> 1e6b4194e
TS-2715 Fix some ESI compile warnings
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/1e6b4194
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/1e6b4194
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/1e6b4194
Branch: refs/heads/master
Commit: 1e6b4194e80a99e9d9b9ede0a66611209b52c178
Parents: b90a731
Author: Leif Hedstrom <zw...@apache.org>
Authored: Mon Apr 14 13:51:11 2014 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Mon Apr 14 13:51:11 2014 -0600
----------------------------------------------------------------------
CHANGES | 3 +++
plugins/experimental/esi/lib/EsiGzip.cc | 12 ------------
plugins/experimental/esi/lib/gzip.cc | 12 ------------
plugins/experimental/esi/lib/gzip.h | 14 ++++++++++++++
4 files changed, 17 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1e6b4194/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 93b67d0..0ffa264 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 5.0.0
+ *) [TS-2715] Fix some ESI compile warnings, change the constants to
+ be part of an include.
+
*) [TS-898] Remove pointless NULL check on address of array.
*) [TS-898] Avoid passing -1 to close (2) in traffic_cop.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1e6b4194/plugins/experimental/esi/lib/EsiGzip.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/esi/lib/EsiGzip.cc b/plugins/experimental/esi/lib/EsiGzip.cc
index 312ed30..c7d5534 100644
--- a/plugins/experimental/esi/lib/EsiGzip.cc
+++ b/plugins/experimental/esi/lib/EsiGzip.cc
@@ -29,18 +29,6 @@
using std::string;
using namespace EsiLib;
-static const int COMPRESSION_LEVEL = 6;
-static const int ZLIB_MEM_LEVEL = 8;
-
-static const int GZIP_HEADER_SIZE = 10;
-static const int GZIP_TRAILER_SIZE = 8;
-
-static const char MAGIC_BYTE_1 = 0x1f;
-static const char MAGIC_BYTE_2 = 0x8b;
-static const char OS_TYPE = 3; // Unix
-
-static const int BUF_SIZE = 1 << 15; // 32k buffer
-
EsiGzip::EsiGzip(const char *debug_tag,
ComponentBase::Debug debug_func, ComponentBase::Error error_func)
: ComponentBase(debug_tag, debug_func, error_func),
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1e6b4194/plugins/experimental/esi/lib/gzip.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/esi/lib/gzip.cc b/plugins/experimental/esi/lib/gzip.cc
index 5be1be4..9a38ce4 100644
--- a/plugins/experimental/esi/lib/gzip.cc
+++ b/plugins/experimental/esi/lib/gzip.cc
@@ -31,18 +31,6 @@
using namespace EsiLib;
using std::string;
-static const int COMPRESSION_LEVEL = 6;
-static const int ZLIB_MEM_LEVEL = 8;
-
-static const int GZIP_HEADER_SIZE = 10;
-static const int GZIP_TRAILER_SIZE = 8;
-
-static const char MAGIC_BYTE_1 = 0x1f;
-static const char MAGIC_BYTE_2 = 0x8b;
-static const char OS_TYPE = 3; // Unix
-
-static const int BUF_SIZE = 1 << 15; // 32k buffer
-
template<typename T>
inline void append(string &out, T data) {
for (unsigned int i = 0; i < sizeof(data); ++i) {
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1e6b4194/plugins/experimental/esi/lib/gzip.h
----------------------------------------------------------------------
diff --git a/plugins/experimental/esi/lib/gzip.h b/plugins/experimental/esi/lib/gzip.h
index 92d81ec..13906b8 100644
--- a/plugins/experimental/esi/lib/gzip.h
+++ b/plugins/experimental/esi/lib/gzip.h
@@ -28,6 +28,20 @@
#include <string>
#include <list>
+// Defines for various GZIP constants
+static const int COMPRESSION_LEVEL = 6;
+static const int ZLIB_MEM_LEVEL = 8;
+
+static const int GZIP_HEADER_SIZE = 10;
+static const int GZIP_TRAILER_SIZE = 8;
+
+static const char MAGIC_BYTE_1 = 0x1f;
+static const char MAGIC_BYTE_2 = 0x8b;
+static const char OS_TYPE = 3; // Unix
+
+static const int BUF_SIZE = 1 << 15; // 32k buffer
+
+
namespace EsiLib {
struct ByteBlock {