Browse Source

Fix some gcc warnings

bel 10 years ago
parent
commit
1b730992c9
3 changed files with 5 additions and 5 deletions
  1. 2 2
      src/civetweb.c
  2. 1 1
      src/main.c
  3. 2 2
      src/mod_lua.inl

+ 2 - 2
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;

+ 1 - 1
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;

+ 2 - 2
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;