From ff7638b0eddc64b95222a9b7a20c3a7268468031 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 24 Oct 2005 15:38:47 -0200 Subject: [PATCH] VC warnings --- lparser.c | 4 ++-- lua.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lparser.c b/lparser.c index d7964f1d..f9034e0e 100644 --- a/lparser.c +++ b/lparser.c @@ -1,5 +1,5 @@ /* -** $Id: lparser.c,v 2.36 2005/09/30 14:21:56 roberto Exp roberto $ +** $Id: lparser.c,v 2.37 2005/10/03 14:02:40 roberto Exp roberto $ ** Lua Parser ** See Copyright Notice in lua.h */ @@ -184,7 +184,7 @@ static void new_localvar (LexState *ls, TString *name, int n) { static void adjustlocalvars (LexState *ls, int nvars) { FuncState *fs = ls->fs; - fs->nactvar += nvars; + fs->nactvar = cast(lu_byte, fs->nactvar + nvars); for (; nvars; nvars--) { getlocvar(fs, fs->nactvar - nvars).startpc = fs->pc; } diff --git a/lua.c b/lua.c index fcc778b7..7aec6d1b 100644 --- a/lua.c +++ b/lua.c @@ -1,5 +1,5 @@ /* -** $Id: lua.c,v 1.152 2005/10/14 18:34:23 roberto Exp roberto $ +** $Id: lua.c,v 1.153 2005/10/21 13:48:31 roberto Exp roberto $ ** Lua stand-alone interpreter ** See Copyright Notice in lua.h */ @@ -253,7 +253,7 @@ static int handle_script (lua_State *L, char **argv, int n) { } -static int collectargs (lua_State *L, char **argv, int *pi, int *pv, int *pe) { +static int collectargs (char **argv, int *pi, int *pv, int *pe) { int i; for (i = 1; argv[i] != NULL; i++) { if (argv[i][0] != '-') /* not an option? */ @@ -333,7 +333,7 @@ static int pmain (lua_State *L) { luaL_openlibs(L); /* open libraries */ s->status = handle_luainit(L); if (s->status != 0) return 0; - script = collectargs(L, argv, &has_i, &has_v, &has_e); + script = collectargs(argv, &has_i, &has_v, &has_e); if (script < 0) { /* invalid args? */ print_usage(); s->status = 1;