From 0acd55898d0aaae8dbc14c8a1bc1e3bdffc8701b Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Sat, 27 Jul 2024 13:32:59 -0300 Subject: Added gcc option '-Wconversion' No warnings for standard numerical types. Still pending alternative numerical types. --- lmem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lmem.c') diff --git a/lmem.c b/lmem.c index dfd8a49b..d02c9fdc 100644 --- a/lmem.c +++ b/lmem.c @@ -95,7 +95,7 @@ static void *firsttry (global_State *g, void *block, size_t os, size_t ns) { void *luaM_growaux_ (lua_State *L, void *block, int nelems, int *psize, - int size_elems, int limit, const char *what) { + unsigned size_elems, int limit, const char *what) { void *newblock; int size = *psize; if (nelems + 1 <= size) /* does one extra element still fit? */ @@ -203,9 +203,9 @@ void *luaM_malloc_ (lua_State *L, size_t size, int tag) { return NULL; /* that's all */ else { global_State *g = G(L); - void *newblock = firsttry(g, NULL, tag, size); + void *newblock = firsttry(g, NULL, cast_sizet(tag), size); if (l_unlikely(newblock == NULL)) { - newblock = tryagain(L, NULL, tag, size); + newblock = tryagain(L, NULL, cast_sizet(tag), size); if (newblock == NULL) luaM_error(L); } -- cgit v1.2.3-55-g6feb