diff --git a/src/civetweb.c b/src/civetweb.c index 48b9b504..a622bb61 100755 --- a/src/civetweb.c +++ b/src/civetweb.c @@ -1446,7 +1446,7 @@ static void sockaddr_to_string(char *buf, size_t len, const union usa *usa) if (!usa) { return; } - + if (usa->sa.sa_family == AF_INET) { getnameinfo( &usa->sa, sizeof(usa->sin), buf, len, NULL, 0, NI_NUMERICHOST); @@ -6808,7 +6808,7 @@ static void read_websocket(struct mg_connection *conn, memcpy(data, buf + header_len, len); error = 0; while (len < data_len) { - int n = pull(NULL, conn, data + len, (int)(data_len - len)); + n = pull(NULL, conn, data + len, (int)(data_len - len)); if (n <= 0) { error = 1; break; diff --git a/src/main.c b/src/main.c index fbaf805e..5cc53d1f 100644 --- a/src/main.c +++ b/src/main.c @@ -643,7 +643,7 @@ static void set_absolute_path(char *options[], #include "lauxlib.h" extern void lua_civet_open_all_libs(lua_State *L); -int run_lua(const char *file_name) +static int run_lua(const char *file_name) { struct lua_State *L; int lua_ret; diff --git a/src/mod_lua.inl b/src/mod_lua.inl index a085748c..0eb233b1 100644 --- a/src/mod_lua.inl +++ b/src/mod_lua.inl @@ -1163,8 +1163,8 @@ static void *lua_allocator(void *ud, void *ptr, size_t osize, size_t nsize) { return mg_realloc(ptr, nsize); } -void mg_exec_lua_script(struct mg_connection *conn, const char *path, - const void **exports) { +static void mg_exec_lua_script(struct mg_connection *conn, const char *path, + const void **exports) { int i; lua_State *L;