aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-12-21 15:31:35 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-12-21 15:31:35 -0200
commitf42cc90d2d51b1121aa2ed44530013f1df09fec6 (patch)
treeaa229e5af86f2dbcbf7122c01354020b85be64f8
parent9d2e454d6f42f86faf645a4a24f66023846ea9ab (diff)
downloadlua-f42cc90d2d51b1121aa2ed44530013f1df09fec6.tar.gz
lua-f42cc90d2d51b1121aa2ed44530013f1df09fec6.tar.bz2
lua-f42cc90d2d51b1121aa2ed44530013f1df09fec6.zip
some warnings
-rw-r--r--lfunc.c4
-rw-r--r--lparser.c2
-rw-r--r--ltable.c4
-rw-r--r--lua.h1
4 files changed, 5 insertions, 6 deletions
diff --git a/lfunc.c b/lfunc.c
index d1eaa2f9..72d9c863 100644
--- a/lfunc.c
+++ b/lfunc.c
@@ -29,7 +29,7 @@ Closure *luaF_newCclosure (lua_State *L, int nelems) {
29 c->c.next = G(L)->rootcl; 29 c->c.next = G(L)->rootcl;
30 G(L)->rootcl = c; 30 G(L)->rootcl = c;
31 c->c.marked = 0; 31 c->c.marked = 0;
32 c->c.nupvalues = nelems; 32 c->c.nupvalues = cast(short, nelems);
33 return c; 33 return c;
34} 34}
35 35
@@ -40,7 +40,7 @@ Closure *luaF_newLclosure (lua_State *L, int nelems) {
40 c->c.next = G(L)->rootcl; 40 c->c.next = G(L)->rootcl;
41 G(L)->rootcl = c; 41 G(L)->rootcl = c;
42 c->l.marked = 0; 42 c->l.marked = 0;
43 c->l.nupvalues = nelems; 43 c->l.nupvalues = cast(short, nelems);
44 return c; 44 return c;
45} 45}
46 46
diff --git a/lparser.c b/lparser.c
index 838e6336..2a11fef6 100644
--- a/lparser.c
+++ b/lparser.c
@@ -443,7 +443,7 @@ static void funcargs (LexState *ls, expdesc *f) {
443 } 443 }
444 default: { 444 default: {
445 luaK_error(ls, "function arguments expected"); 445 luaK_error(ls, "function arguments expected");
446 break; 446 return;
447 } 447 }
448 } 448 }
449 lua_assert(f->k == VNONRELOC); 449 lua_assert(f->k == VNONRELOC);
diff --git a/ltable.c b/ltable.c
index 9485a527..12d46e02 100644
--- a/ltable.c
+++ b/ltable.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltable.c,v 1.93 2001/12/11 22:48:44 roberto Exp roberto $ 2** $Id: ltable.c,v 1.1 2001/11/29 22:14:34 rieru Exp rieru $
3** Lua tables (hash) 3** Lua tables (hash)
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -275,7 +275,7 @@ Table *luaH_new (lua_State *L, int narray, int lnhash) {
275 G(L)->roottable = t; 275 G(L)->roottable = t;
276 t->mark = t; 276 t->mark = t;
277 t->weakmode = 0; 277 t->weakmode = 0;
278 t->flags = ~0; 278 t->flags = cast(unsigned short, ~0);
279 /* temporary values (kept only if some malloc fails) */ 279 /* temporary values (kept only if some malloc fails) */
280 t->array = NULL; 280 t->array = NULL;
281 t->sizearray = 0; 281 t->sizearray = 0;
diff --git a/lua.h b/lua.h
index a008a7a0..1ddacf33 100644
--- a/lua.h
+++ b/lua.h
@@ -155,7 +155,6 @@ LUA_API void lua_gettable (lua_State *L, int index);
155LUA_API void lua_rawget (lua_State *L, int index); 155LUA_API void lua_rawget (lua_State *L, int index);
156LUA_API void lua_rawgeti (lua_State *L, int index, int n); 156LUA_API void lua_rawgeti (lua_State *L, int index, int n);
157LUA_API void lua_newtable (lua_State *L); 157LUA_API void lua_newtable (lua_State *L);
158LUA_API void lua_getweakregistry (lua_State *L);
159LUA_API void lua_geteventtable (lua_State *L, int objindex); 158LUA_API void lua_geteventtable (lua_State *L, int objindex);
160 159
161 160