aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-10-24 15:38:47 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-10-24 15:38:47 -0200
commitff7638b0eddc64b95222a9b7a20c3a7268468031 (patch)
tree6a4b439363cdbf278bf7045b2ffae859fb6b8b57
parent8e48ebb638594bdf38e992e042a256a713856c18 (diff)
downloadlua-ff7638b0eddc64b95222a9b7a20c3a7268468031.tar.gz
lua-ff7638b0eddc64b95222a9b7a20c3a7268468031.tar.bz2
lua-ff7638b0eddc64b95222a9b7a20c3a7268468031.zip
VC warnings
-rw-r--r--lparser.c4
-rw-r--r--lua.c6
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 @@
1/* 1/*
2** $Id: lparser.c,v 2.36 2005/09/30 14:21:56 roberto Exp roberto $ 2** $Id: lparser.c,v 2.37 2005/10/03 14:02:40 roberto Exp roberto $
3** Lua Parser 3** Lua Parser
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -184,7 +184,7 @@ static void new_localvar (LexState *ls, TString *name, int n) {
184 184
185static void adjustlocalvars (LexState *ls, int nvars) { 185static void adjustlocalvars (LexState *ls, int nvars) {
186 FuncState *fs = ls->fs; 186 FuncState *fs = ls->fs;
187 fs->nactvar += nvars; 187 fs->nactvar = cast(lu_byte, fs->nactvar + nvars);
188 for (; nvars; nvars--) { 188 for (; nvars; nvars--) {
189 getlocvar(fs, fs->nactvar - nvars).startpc = fs->pc; 189 getlocvar(fs, fs->nactvar - nvars).startpc = fs->pc;
190 } 190 }
diff --git a/lua.c b/lua.c
index fcc778b7..7aec6d1b 100644
--- a/lua.c
+++ b/lua.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.c,v 1.152 2005/10/14 18:34:23 roberto Exp roberto $ 2** $Id: lua.c,v 1.153 2005/10/21 13:48:31 roberto Exp roberto $
3** Lua stand-alone interpreter 3** Lua stand-alone interpreter
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -253,7 +253,7 @@ static int handle_script (lua_State *L, char **argv, int n) {
253} 253}
254 254
255 255
256static int collectargs (lua_State *L, char **argv, int *pi, int *pv, int *pe) { 256static int collectargs (char **argv, int *pi, int *pv, int *pe) {
257 int i; 257 int i;
258 for (i = 1; argv[i] != NULL; i++) { 258 for (i = 1; argv[i] != NULL; i++) {
259 if (argv[i][0] != '-') /* not an option? */ 259 if (argv[i][0] != '-') /* not an option? */
@@ -333,7 +333,7 @@ static int pmain (lua_State *L) {
333 luaL_openlibs(L); /* open libraries */ 333 luaL_openlibs(L); /* open libraries */
334 s->status = handle_luainit(L); 334 s->status = handle_luainit(L);
335 if (s->status != 0) return 0; 335 if (s->status != 0) return 0;
336 script = collectargs(L, argv, &has_i, &has_v, &has_e); 336 script = collectargs(argv, &has_i, &has_v, &has_e);
337 if (script < 0) { /* invalid args? */ 337 if (script < 0) { /* invalid args? */
338 print_usage(); 338 print_usage();
339 s->status = 1; 339 s->status = 1;