corrected warnings from different compilers (mostly casts and small

details)
This commit is contained in:
Roberto Ierusalimschy
2010-10-25 17:01:37 -02:00
parent 1475cb59bf
commit 4590a89b32
9 changed files with 21 additions and 22 deletions

4
ldo.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: ldo.c,v 2.88 2010/06/04 13:06:15 roberto Exp roberto $
** $Id: ldo.c,v 2.89 2010/09/30 17:21:31 roberto Exp roberto $
** Stack and Call structure of Lua
** See Copyright Notice in lua.h
*/
@@ -177,7 +177,7 @@ void luaD_growstack (lua_State *L, int n) {
if (size > LUAI_MAXSTACK) /* error after extra size? */
luaD_throw(L, LUA_ERRERR);
else {
int needed = L->top - L->stack + n + EXTRA_STACK;
int needed = cast_int(L->top - L->stack) + n + EXTRA_STACK;
int newsize = 2 * size;
if (newsize > LUAI_MAXSTACK) newsize = LUAI_MAXSTACK;
if (newsize < needed) newsize = needed;