1
0
mirror of https://github.com/lammertb/libhttp.git synced 2025-09-04 12:42:09 +03:00

Fix some gcc warnings

This commit is contained in:
bel
2015-05-21 22:45:33 +02:00
parent 2a5cb9ed6c
commit 1b730992c9
3 changed files with 5 additions and 5 deletions

View File

@@ -1446,7 +1446,7 @@ static void sockaddr_to_string(char *buf, size_t len, const union usa *usa)
if (!usa) { if (!usa) {
return; return;
} }
if (usa->sa.sa_family == AF_INET) { if (usa->sa.sa_family == AF_INET) {
getnameinfo( getnameinfo(
&usa->sa, sizeof(usa->sin), buf, len, NULL, 0, NI_NUMERICHOST); &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); memcpy(data, buf + header_len, len);
error = 0; error = 0;
while (len < data_len) { 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) { if (n <= 0) {
error = 1; error = 1;
break; break;

View File

@@ -643,7 +643,7 @@ static void set_absolute_path(char *options[],
#include "lauxlib.h" #include "lauxlib.h"
extern void lua_civet_open_all_libs(lua_State *L); 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; struct lua_State *L;
int lua_ret; int lua_ret;

View File

@@ -1163,8 +1163,8 @@ static void *lua_allocator(void *ud, void *ptr, size_t osize, size_t nsize) {
return mg_realloc(ptr, nsize); return mg_realloc(ptr, nsize);
} }
void mg_exec_lua_script(struct mg_connection *conn, const char *path, static void mg_exec_lua_script(struct mg_connection *conn, const char *path,
const void **exports) { const void **exports) {
int i; int i;
lua_State *L; lua_State *L;