mirror of
https://github.com/lua/lua
synced 2025-04-13 00:12:53 +03:00
warnings from Visual Studio /W3
This commit is contained in:
parent
10b8c99bbb
commit
ac78b914b6
4
lcode.c
4
lcode.c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lcode.c,v 2.140 2017/11/30 13:17:06 roberto Exp roberto $
|
||||
** $Id: lcode.c,v 2.140 2017/11/30 13:29:18 roberto Exp roberto $
|
||||
** Code generator for Lua
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -1128,7 +1128,7 @@ void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k) {
|
||||
t->k = VINDEXSTR;
|
||||
}
|
||||
else if (isCint(k)) {
|
||||
t->u.ind.idx = k->u.ival; /* integer constant */
|
||||
t->u.ind.idx = cast_int(k->u.ival); /* integer constant in proper range */
|
||||
t->k = VINDEXI;
|
||||
}
|
||||
else {
|
||||
|
4
lgc.c
4
lgc.c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lgc.c,v 2.238 2017/11/07 13:25:26 roberto Exp roberto $
|
||||
** $Id: lgc.c,v 2.239 2017/11/23 19:29:04 roberto Exp roberto $
|
||||
** Garbage Collector
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -1270,7 +1270,7 @@ static void genstep (lua_State *L, global_State *g) {
|
||||
lu_mem mem;
|
||||
youngcollection(L, g);
|
||||
mem = gettotalbytes(g);
|
||||
luaE_setdebt(g, -((mem / 100) * g->genminormul));
|
||||
luaE_setdebt(g, -(cast(l_mem, (mem / 100)) * g->genminormul));
|
||||
g->GCestimate = majorbase; /* preserve base value */
|
||||
}
|
||||
}
|
||||
|
4
ltm.c
4
ltm.c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: ltm.c,v 2.49 2017/11/23 19:18:10 roberto Exp roberto $
|
||||
** $Id: ltm.c,v 2.50 2017/11/27 17:44:31 roberto Exp roberto $
|
||||
** Tag methods
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -237,7 +237,7 @@ void luaT_getvarargs (lua_State *L, TValue *t, StkId where, int wanted) {
|
||||
Table *h = hvalue(t);
|
||||
if (wanted < 0) { /* get all? */
|
||||
const TValue *ns = luaH_getstr(h, G(L)->nfield);
|
||||
int n = (ttisinteger(ns)) ? ivalue(ns) : 0;
|
||||
int n = (ttisinteger(ns)) ? cast_int(ivalue(ns)) : 0;
|
||||
wanted = n;
|
||||
checkstackp(L, n, where);
|
||||
L->top = where + n;
|
||||
|
Loading…
x
Reference in New Issue
Block a user