diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-07-27 13:32:59 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-07-27 13:32:59 -0300 |
commit | 0acd55898d0aaae8dbc14c8a1bc1e3bdffc8701b (patch) | |
tree | 0ac634fed90877130b1f102bf4075af999de2158 /lmem.c | |
parent | 15231d4fb2f6984b25e0353ff46eda1a180b686d (diff) | |
download | lua-0acd55898d0aaae8dbc14c8a1bc1e3bdffc8701b.tar.gz lua-0acd55898d0aaae8dbc14c8a1bc1e3bdffc8701b.tar.bz2 lua-0acd55898d0aaae8dbc14c8a1bc1e3bdffc8701b.zip |
Added gcc option '-Wconversion'
No warnings for standard numerical types. Still pending alternative
numerical types.
Diffstat (limited to 'lmem.c')
-rw-r--r-- | lmem.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -95,7 +95,7 @@ static void *firsttry (global_State *g, void *block, size_t os, size_t ns) { | |||
95 | 95 | ||
96 | 96 | ||
97 | void *luaM_growaux_ (lua_State *L, void *block, int nelems, int *psize, | 97 | void *luaM_growaux_ (lua_State *L, void *block, int nelems, int *psize, |
98 | int size_elems, int limit, const char *what) { | 98 | unsigned size_elems, int limit, const char *what) { |
99 | void *newblock; | 99 | void *newblock; |
100 | int size = *psize; | 100 | int size = *psize; |
101 | if (nelems + 1 <= size) /* does one extra element still fit? */ | 101 | 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) { | |||
203 | return NULL; /* that's all */ | 203 | return NULL; /* that's all */ |
204 | else { | 204 | else { |
205 | global_State *g = G(L); | 205 | global_State *g = G(L); |
206 | void *newblock = firsttry(g, NULL, tag, size); | 206 | void *newblock = firsttry(g, NULL, cast_sizet(tag), size); |
207 | if (l_unlikely(newblock == NULL)) { | 207 | if (l_unlikely(newblock == NULL)) { |
208 | newblock = tryagain(L, NULL, tag, size); | 208 | newblock = tryagain(L, NULL, cast_sizet(tag), size); |
209 | if (newblock == NULL) | 209 | if (newblock == NULL) |
210 | luaM_error(L); | 210 | luaM_error(L); |
211 | } | 211 | } |