Commit af89d244 authored by Sergey Lyubka's avatar Sergey Lyubka

Squashed warnings on win32 in Lua code

parent 791ad496
...@@ -81,7 +81,7 @@ static int lsp_sock_send(lua_State *L) { ...@@ -81,7 +81,7 @@ static int lsp_sock_send(lua_State *L) {
if (lua_gettop(L) > 1 && lua_istable(L, -2) && lua_isstring(L, -1)) { if (lua_gettop(L) > 1 && lua_istable(L, -2) && lua_isstring(L, -1)) {
buf = lua_tolstring(L, -1, &len); buf = lua_tolstring(L, -1, &len);
lua_getfield(L, -2, "sock"); lua_getfield(L, -2, "sock");
sock = lua_tonumber(L, -1); sock = (int) lua_tonumber(L, -1);
while (sent < len) { while (sent < len) {
if ((n = send(sock, buf + sent, len - sent, 0)) <= 0) { if ((n = send(sock, buf + sent, len - sent, 0)) <= 0) {
break; break;
...@@ -107,8 +107,8 @@ static int lsp_connect(lua_State *L) { ...@@ -107,8 +107,8 @@ static int lsp_connect(lua_State *L) {
SOCKET sock; SOCKET sock;
if (lua_isstring(L, -3) && lua_isnumber(L, -2) && lua_isnumber(L, -1)) { if (lua_isstring(L, -3) && lua_isnumber(L, -2) && lua_isnumber(L, -1)) {
sock = conn2(lua_tostring(L, -3), lua_tonumber(L, -2), lua_tonumber(L, -1), sock = conn2(lua_tostring(L, -3), (int) lua_tonumber(L, -2),
ebuf, sizeof(ebuf)); (int) lua_tonumber(L, -1), ebuf, sizeof(ebuf));
if (sock == INVALID_SOCKET) { if (sock == INVALID_SOCKET) {
return luaL_error(L, ebuf); return luaL_error(L, ebuf);
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment