summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorpixel <pixel>2008-08-05 09:23:09 +0000
committerpixel <pixel>2008-08-05 09:23:09 +0000
commit09625f783913e2d57cb666760428909e5f7883a7 (patch)
treeb51d14245cadc70c99800bc97c6e6d1854c6ef32 /lib
parentbf0c4cb31f764f6ec9a56576a9e9b800698ccd66 (diff)
Silenting some warnings.
Diffstat (limited to 'lib')
-rw-r--r--lib/lua/src/LuaLib/ldirlib.c5
-rw-r--r--lib/lua/src/luacomp.c4
2 files changed, 5 insertions, 4 deletions
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 <stdlib.h>
+#include <string.h>
#include <dirent.h>
#include <errno.h>
#include <sys/stat.h>
@@ -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);
diff --git a/lib/lua/src/luacomp.c b/lib/lua/src/luacomp.c
index 1246869..abb7979 100644
--- a/lib/lua/src/luacomp.c
+++ b/lib/lua/src/luacomp.c
@@ -1,5 +1,5 @@
/*
- ** $Id: luacomp.c,v 1.8 2007-07-27 10:05:54 pixel Exp $
+ ** $Id: luacomp.c,v 1.9 2008-08-05 09:23:09 pixel Exp $
** Lua compiler (saves bytecodes to files; also list bytecodes)
** Highly hacked by Nicolas "Pixel" Noble to be transformed into a
** small form-factor LUA compiler.
@@ -29,7 +29,7 @@ const char * progname = PROGNAME; /* actual program name */
#define toproto(L, i) (clvalue(L->top + (i))->l.p)
-static const Proto * combine(lua_State * L, int n) {
+static Proto * combine(lua_State * L, int n) {
if (n == 1)
return toproto(L, -1);
else {