warnings from Visual C

This commit is contained in:
Roberto Ierusalimschy
2001-02-08 09:19:10 -02:00
parent 7178a5e34a
commit 6548bf7462
2 changed files with 6 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
/* /*
** $Id: lcode.c,v 1.59 2001/01/29 15:26:40 roberto Exp roberto $ ** $Id: lcode.c,v 1.60 2001/02/07 18:13:49 roberto Exp roberto $
** Code generator for Lua ** Code generator for Lua
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@@ -100,7 +100,7 @@ void luaK_deltastack (FuncState *fs, int delta) {
if (fs->stacklevel > fs->f->maxstacksize) { if (fs->stacklevel > fs->f->maxstacksize) {
if (fs->stacklevel > MAXSTACK) if (fs->stacklevel > MAXSTACK)
luaK_error(fs->ls, "function or expression too complex"); luaK_error(fs->ls, "function or expression too complex");
fs->f->maxstacksize = fs->stacklevel; fs->f->maxstacksize = (short)fs->stacklevel;
} }
} }

View File

@@ -1,5 +1,5 @@
/* /*
** $Id: lparser.c,v 1.128 2001/01/31 13:13:17 roberto Exp roberto $ ** $Id: lparser.c,v 1.129 2001/02/05 17:48:52 roberto Exp roberto $
** LL(1) Parser and code generator for Lua ** LL(1) Parser and code generator for Lua
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@@ -261,11 +261,11 @@ static void adjust_mult_assign (LexState *ls, int nvars, int nexps) {
} }
static void code_params (LexState *ls, int nparams, int dots) { static void code_params (LexState *ls, int nparams, short dots) {
FuncState *fs = ls->fs; FuncState *fs = ls->fs;
adjustlocalvars(ls, nparams); adjustlocalvars(ls, nparams);
luaX_checklimit(ls, fs->nactloc, MAXPARAMS, "parameters"); luaX_checklimit(ls, fs->nactloc, MAXPARAMS, "parameters");
fs->f->numparams = fs->nactloc; /* `self' could be there already */ fs->f->numparams = (short)fs->nactloc; /* `self' could be there already */
fs->f->is_vararg = dots; fs->f->is_vararg = dots;
if (dots) { if (dots) {
new_localvarstr(ls, "arg", 0); new_localvarstr(ls, "arg", 0);
@@ -1093,7 +1093,7 @@ static int stat (LexState *ls) {
static void parlist (LexState *ls) { static void parlist (LexState *ls) {
/* parlist -> [ param { ',' param } ] */ /* parlist -> [ param { ',' param } ] */
int nparams = 0; int nparams = 0;
int dots = 0; short dots = 0;
if (ls->t.token != ')') { /* is `parlist' not empty? */ if (ls->t.token != ')') { /* is `parlist' not empty? */
do { do {
switch (ls->t.token) { switch (ls->t.token) {