Added gcc option '-Wconversion'
No warnings for standard numerical types. Still pending alternative numerical types.
This commit is contained in:
6
lmem.c
6
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user