ts-lua
ts-lua copied to clipboard
Compilation Warnings.
Good day Sir.
just want to share some compilation warning for this plugin.
make
cc -Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -c -fPIC -o ts_lua_util.lo ts_lua_util.c -Imodules -I/usr/include/lua-5.1
cc -Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -c -fPIC -o ts_lua_remap.lo ts_lua_remap.c -Imodules -I/usr/include/lua-5.1
cc -Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -c -fPIC -o ts_lua_hook.lo ts_lua_hook.c -Imodules -I/usr/include/lua-5.1
cc -Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -c -fPIC -o ts_lua_context.lo ts_lua_context.c -Imodules -I/usr/include/lua-5.1
cc -Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -c -fPIC -o ts_lua_misc.lo ts_lua_misc.c -Imodules -I/usr/include/lua-5.1
cc -Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -c -fPIC -o ts_lua_http.lo ts_lua_http.c -Imodules -I/usr/include/lua-5.1
ts_lua_http.c: In function ‘ts_lua_http_set_retbody’:
ts_lua_http.c:155:5: warning: implicit declaration of function ‘TSHttpTxnSetHttpRetBody’ [-Wimplicit-function-declaration]
TSHttpTxnSetHttpRetBody(http_ctx->txnp, body, 1);
^
cc -Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -c -fPIC -o ts_lua_transform.lo ts_lua_transform.c -Imodules -I/usr/include/lua-5.1
cc -Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -c -fPIC -o ts_lua_log.lo ts_lua_log.c -Imodules -I/usr/include/lua-5.1
ts_lua_log.c: In function ‘ts_lua_log_object_creat’:
ts_lua_log.c:60:22: warning: variable ‘http_ctx’ set but not used [-Wunused-but-set-variable]
ts_lua_http_ctx http_ctx;
^
ts_lua_log.c: In function ‘ts_lua_log_object_write’:
ts_lua_log.c:97:22: warning: variable ‘http_ctx’ set but not used [-Wunused-but-set-variable]
ts_lua_http_ctx *http_ctx;
^
ts_lua_log.c: In function ‘ts_lua_log_object_destroy’:
ts_lua_log.c:121:22: warning: variable ‘http_ctx’ set but not used [-Wunused-but-set-variable]
ts_lua_http_ctx *http_ctx;
^
cc -Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -c -fPIC -o ts_lua_http_intercept.lo ts_lua_http_intercept.c -Imodules -I/usr/include/lua-5.1
ts_lua_http_intercept.c: In function ‘ts_lua_http_intercept_handler’:
ts_lua_http_intercept.c:207:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
n = (int64_t)edata & 0xFFFF;
^
cc -Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -c -fPIC -o ts_lua_regex.lo ts_lua_regex.c -Imodules -I/usr/include/lua-5.1
cc -Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -c -fPIC -o ts_lua_http_config.lo ts_lua_http_config.c -Imodules -I/usr/include/lua-5.1
cc -Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -c -fPIC -o ts_lua_crypto.lo ts_lua_crypto.c -Imodules -I/usr/include/lua-5.1
cc -Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -c -fPIC -o ts_lua_hash_table.lo ts_lua_hash_table.c -Imodules -I/usr/include/lua-5.1
cc -Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -c -fPIC -o ts_lua_mgmt.lo ts_lua_mgmt.c -Imodules -I/usr/include/lua-5.1
cc -Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -c -fPIC -o ts_lua_http_cntl.lo ts_lua_http_cntl.c -Imodules -I/usr/include/lua-5.1
cc -Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -c -fPIC -o ts_lua_shared_dict.lo ts_lua_shared_dict.c -Imodules -I/usr/include/lua-5.1
ts_lua_shared_dict.c: In function ‘ts_lua_shared_dict_init’:
ts_lua_shared_dict.c:218:12: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
int n, ret;
^
ts_lua_shared_dict.c: In function ‘ts_lua_shared_dict_set’:
ts_lua_shared_dict.c:295:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
hKey = (void)nkey;
^
ts_lua_shared_dict.c: In function ‘ts_lua_shared_dict_get’:
ts_lua_shared_dict.c:419:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
hKey = (void_)nkey;
^
ts_lua_shared_dict.c: In function ‘ts_lua_shared_dict_del’:
ts_lua_shared_dict.c:496:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
hKey = (void_)nkey;
^
ts_lua_shared_dict.c: In function ‘dump_entry_key’:
ts_lua_shared_dict.c:613:27: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
lua_pushnumber(L, (int64_t)key);
^
cc -Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -c -fPIC -o ts_lua_package.lo ts_lua_package.c -Imodules -I/usr/include/lua-5.1
cc -Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -o libtslua.so -shared ts_lua.lo ts_lua_string.lo ts_lua_client_request.lo ts_lua_client_response.lo ts_lua_server_request.lo ts_lua_server_response.lo ts_lua_cached_response.lo ts_lua_util.lo ts_lua_remap.lo ts_lua_hook.lo ts_lua_context.lo ts_lua_misc.lo ts_lua_http.lo ts_lua_transform.lo ts_lua_log.lo ts_lua_http_intercept.lo ts_lua_regex.lo ts_lua_http_config.lo ts_lua_crypto.lo ts_lua_hash_table.lo ts_lua_mgmt.lo ts_lua_http_cntl.lo ts_lua_shared_dict.lo ts_lua_package.lo -L/usr/local/lib -lssl -llua-5.1 -lpcre -ltcl
are these normal ?
much regards
What's your ats's version? I didn't get warnings neither on linux nor freebsd. I suggest you can try with the latest ats.
This was compiled against ATS 5.0.0 master, on Fedora 20.
I always use latest master git on my systems even on production and so far it been working fine in forward proxy mode. and i wanted the new features in your plugin which triggers a great interest in doing dynamic object caching such as youtube and stuff. ts_lua patch already bundled with ATS even experimental never had issues to compile with lua5.1 nor with lua 5.2. and never got any issues in forward proxy mode. and i am heavily using it also couple of guys whom i know hold shares in huge ISP companies using ATS+ts_lua to do forward proxy caching and working like a charm so far without the features that are addressed in your plugin which are so much of a need to get things work even better.
Much Regards
lua-5.2 is not recommended, as it is very different with lua-5.1, ts-lua cann't work with lua-5.2 right now, I will try to fix compile warning asap.
Hi degreane, I know the reason, function like ‘TSHttpTxnSetHttpRetBody’ is remove from ats. I will fix it asap.
Hi degreane, I had fix some compile warnings, but there is still some left as I think the problem is your system is 32 bit.
Ok am installing a fresh installation now Fedora19 x86_64
will keep you updated what i will come up with much regards
sorry i closed it by mistake
Ok, thanks for your feedback, it is very useful.
https://github.com/portl4t/ts-lua/wiki/support-Lua-5.2