aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-11-30 13:37:16 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-11-30 13:37:16 -0200
commitac78b914b655dd8e89d306f6336a229452046ead (patch)
tree39256ce1e13ddd39d114d838474a88be081cb4b6
parent10b8c99bbbb5405f5fb37513645421b8e3c3ba43 (diff)
downloadlua-ac78b914b655dd8e89d306f6336a229452046ead.tar.gz
lua-ac78b914b655dd8e89d306f6336a229452046ead.tar.bz2
lua-ac78b914b655dd8e89d306f6336a229452046ead.zip
warnings from Visual Studio /W3
-rw-r--r--lcode.c4
-rw-r--r--lgc.c4
-rw-r--r--ltm.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/lcode.c b/lcode.c
index d1585193..56fd8522 100644
--- a/lcode.c
+++ b/lcode.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lcode.c,v 2.140 2017/11/30 13:17:06 roberto Exp roberto $ 2** $Id: lcode.c,v 2.140 2017/11/30 13:29:18 roberto Exp roberto $
3** Code generator for Lua 3** Code generator for Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -1128,7 +1128,7 @@ void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k) {
1128 t->k = VINDEXSTR; 1128 t->k = VINDEXSTR;
1129 } 1129 }
1130 else if (isCint(k)) { 1130 else if (isCint(k)) {
1131 t->u.ind.idx = k->u.ival; /* integer constant */ 1131 t->u.ind.idx = cast_int(k->u.ival); /* integer constant in proper range */
1132 t->k = VINDEXI; 1132 t->k = VINDEXI;
1133 } 1133 }
1134 else { 1134 else {
diff --git a/lgc.c b/lgc.c
index 389d69bb..f4b8d6a4 100644
--- a/lgc.c
+++ b/lgc.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lgc.c,v 2.238 2017/11/07 13:25:26 roberto Exp roberto $ 2** $Id: lgc.c,v 2.239 2017/11/23 19:29:04 roberto Exp roberto $
3** Garbage Collector 3** Garbage Collector
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -1270,7 +1270,7 @@ static void genstep (lua_State *L, global_State *g) {
1270 lu_mem mem; 1270 lu_mem mem;
1271 youngcollection(L, g); 1271 youngcollection(L, g);
1272 mem = gettotalbytes(g); 1272 mem = gettotalbytes(g);
1273 luaE_setdebt(g, -((mem / 100) * g->genminormul)); 1273 luaE_setdebt(g, -(cast(l_mem, (mem / 100)) * g->genminormul));
1274 g->GCestimate = majorbase; /* preserve base value */ 1274 g->GCestimate = majorbase; /* preserve base value */
1275 } 1275 }
1276} 1276}
diff --git a/ltm.c b/ltm.c
index 5ee123f5..fe87553d 100644
--- a/ltm.c
+++ b/ltm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltm.c,v 2.49 2017/11/23 19:18:10 roberto Exp roberto $ 2** $Id: ltm.c,v 2.50 2017/11/27 17:44:31 roberto Exp roberto $
3** Tag methods 3** Tag methods
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -237,7 +237,7 @@ void luaT_getvarargs (lua_State *L, TValue *t, StkId where, int wanted) {
237 Table *h = hvalue(t); 237 Table *h = hvalue(t);
238 if (wanted < 0) { /* get all? */ 238 if (wanted < 0) { /* get all? */
239 const TValue *ns = luaH_getstr(h, G(L)->nfield); 239 const TValue *ns = luaH_getstr(h, G(L)->nfield);
240 int n = (ttisinteger(ns)) ? ivalue(ns) : 0; 240 int n = (ttisinteger(ns)) ? cast_int(ivalue(ns)) : 0;
241 wanted = n; 241 wanted = n;
242 checkstackp(L, n, where); 242 checkstackp(L, n, where);
243 L->top = where + n; 243 L->top = where + n;