From 09625f783913e2d57cb666760428909e5f7883a7 Mon Sep 17 00:00:00 2001 From: pixel Date: Tue, 5 Aug 2008 09:23:09 +0000 Subject: Silenting some warnings. --- lib/lua/src/LuaLib/ldirlib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/lua/src/LuaLib') diff --git a/lib/lua/src/LuaLib/ldirlib.c b/lib/lua/src/LuaLib/ldirlib.c index d12f1ab..3b14bdc 100644 --- a/lib/lua/src/LuaLib/ldirlib.c +++ b/lib/lua/src/LuaLib/ldirlib.c @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -19,7 +20,7 @@ static int l_dir (lua_State *L) { DIR **d; /* create a userdatum to store a DIR address */ - p = lua_newuserdata(L, sizeof(DIR *) + strlen(path) + 1); + p = (char *) lua_newuserdata(L, sizeof(DIR *) + strlen(path) + 1); d = (DIR **) p; d_path = p + sizeof(DIR *); @@ -58,7 +59,7 @@ static int dir_iter (lua_State *L) { lua_pushstring(L, "name"); lua_pushstring(L, entry->d_name); lua_settable(L, -3); - fullpath = malloc(strlen(path) + strlen(entry->d_name) + 2); + fullpath = (char *) malloc(strlen(path) + strlen(entry->d_name) + 2); sprintf(fullpath, "%s/%s", path, entry->d_name); #ifdef _WIN32 _stat(fullpath, &file_stat); -- cgit v1.2.3