diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-07-27 15:13:21 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-07-27 15:13:21 -0300 |
commit | f2206b2abe848f65956fa48da338c2bfac599e4a (patch) | |
tree | 94c1a856ec06846ad7485648ccafb429b5ca1b9b /lmem.c | |
parent | 0acd55898d0aaae8dbc14c8a1bc1e3bdffc8701b (diff) | |
download | lua-f2206b2abe848f65956fa48da338c2bfac599e4a.tar.gz lua-f2206b2abe848f65956fa48da338c2bfac599e4a.tar.bz2 lua-f2206b2abe848f65956fa48da338c2bfac599e4a.zip |
'-Wconversion' extended to all options of Lua numbers
Diffstat (limited to 'lmem.c')
-rw-r--r-- | lmem.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -126,10 +126,10 @@ void *luaM_growaux_ (lua_State *L, void *block, int nelems, int *psize, | |||
126 | ** error. | 126 | ** error. |
127 | */ | 127 | */ |
128 | void *luaM_shrinkvector_ (lua_State *L, void *block, int *size, | 128 | void *luaM_shrinkvector_ (lua_State *L, void *block, int *size, |
129 | int final_n, int size_elem) { | 129 | int final_n, unsigned size_elem) { |
130 | void *newblock; | 130 | void *newblock; |
131 | size_t oldsize = cast_sizet((*size) * size_elem); | 131 | size_t oldsize = cast_sizet(*size) * size_elem; |
132 | size_t newsize = cast_sizet(final_n * size_elem); | 132 | size_t newsize = cast_sizet(final_n) * size_elem; |
133 | lua_assert(newsize <= oldsize); | 133 | lua_assert(newsize <= oldsize); |
134 | newblock = luaM_saferealloc_(L, block, oldsize, newsize); | 134 | newblock = luaM_saferealloc_(L, block, oldsize, newsize); |
135 | *size = final_n; | 135 | *size = final_n; |