You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ki...@apache.org on 2013/12/05 04:42:31 UTC

git commit: TS-2335: some more fixes for compile warning for ts_lua plugin

Updated Branches:
  refs/heads/master 9f69f05f2 -> c1d73e836


TS-2335: some more fixes for compile warning for ts_lua plugin


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

Branch: refs/heads/master
Commit: c1d73e8364c201657693c5acbf230bd6addca5a7
Parents: 9f69f05
Author: Kit Chan <ki...@apache.org>
Authored: Wed Dec 4 19:42:08 2013 -0800
Committer: Kit Chan <ki...@apache.org>
Committed: Wed Dec 4 19:42:08 2013 -0800

----------------------------------------------------------------------
 plugins/experimental/ts_lua/ts_lua_hook.c |  2 +-
 plugins/experimental/ts_lua/ts_lua_http.c |  2 +-
 plugins/experimental/ts_lua/ts_lua_log.c  | 14 +-------------
 3 files changed, 3 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c1d73e83/plugins/experimental/ts_lua/ts_lua_hook.c
----------------------------------------------------------------------
diff --git a/plugins/experimental/ts_lua/ts_lua_hook.c b/plugins/experimental/ts_lua/ts_lua_hook.c
index 2fec024..66e57a1 100644
--- a/plugins/experimental/ts_lua/ts_lua_hook.c
+++ b/plugins/experimental/ts_lua/ts_lua_hook.c
@@ -62,7 +62,7 @@ ts_lua_inject_hook_api(lua_State *L)
 static void
 ts_lua_inject_hook_variables(lua_State *L)
 {
-    int     i;
+    unsigned int     i;
 
     for (i = 0; i < sizeof(ts_lua_hook_id_string)/sizeof(char*); i++) {
         lua_pushinteger(L, i);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c1d73e83/plugins/experimental/ts_lua/ts_lua_http.c
----------------------------------------------------------------------
diff --git a/plugins/experimental/ts_lua/ts_lua_http.c b/plugins/experimental/ts_lua/ts_lua_http.c
index e662fcc..b800881 100644
--- a/plugins/experimental/ts_lua/ts_lua_http.c
+++ b/plugins/experimental/ts_lua/ts_lua_http.c
@@ -100,7 +100,7 @@ ts_lua_inject_http_transform_api(lua_State *L)
 static void
 ts_lua_inject_cache_lookup_result_variables(lua_State *L)
 {
-    int     i;
+    unsigned int     i;
 
     for (i = 0; i < sizeof(ts_lua_cache_lookup_result_string)/sizeof(char*); i++) {
         lua_pushinteger(L, i);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c1d73e83/plugins/experimental/ts_lua/ts_lua_log.c
----------------------------------------------------------------------
diff --git a/plugins/experimental/ts_lua/ts_lua_log.c b/plugins/experimental/ts_lua/ts_lua_log.c
index ea4247a..cf58d6f 100644
--- a/plugins/experimental/ts_lua/ts_lua_log.c
+++ b/plugins/experimental/ts_lua/ts_lua_log.c
@@ -57,10 +57,6 @@ ts_lua_log_object_creat(lua_State *L)
     int log_mode;
     TSReturnCode error;
 
-    ts_lua_http_ctx  *http_ctx;
-
-    http_ctx = ts_lua_get_http_ctx(L);
-
     log_name = luaL_checklstring(L, -2, &name_len);
 
     if (lua_isnil(L, 3)) {
@@ -94,10 +90,6 @@ ts_lua_log_object_write(lua_State *L)
     const char  *text;
     size_t      text_len;
 
-    ts_lua_http_ctx  *http_ctx;
-
-    http_ctx = ts_lua_get_http_ctx(L);
-
     text = luaL_checklstring(L, 1, &text_len);
     if(log) {
         TSTextLogObjectWrite(log, "%s", text);
@@ -116,12 +108,8 @@ ts_lua_inject_log_object_destroy_api(lua_State * L)
 }
 
 static int
-ts_lua_log_object_destroy(lua_State *L)
+ts_lua_log_object_destroy(lua_State *L ATS_UNUSED )
 {
-    ts_lua_http_ctx *http_ctx;
-
-    http_ctx = ts_lua_get_http_ctx(L);
-
     if(TSTextLogObjectDestroy(log) != TS_SUCCESS)
         TSError("[%s] TSTextLogObjectDestroy error!",__FUNCTION__);