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. --- lstring.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lstring.c') diff --git a/lstring.c b/lstring.c index 86ee2411..0c89a51b 100644 --- a/lstring.c +++ b/lstring.c @@ -164,7 +164,7 @@ size_t luaS_sizelngstr (size_t len, int kind) { /* ** creates a new string object */ -static TString *createstrobj (lua_State *L, size_t totalsize, int tag, +static TString *createstrobj (lua_State *L, size_t totalsize, lu_byte tag, unsigned h) { TString *ts; GCObject *o; @@ -233,7 +233,7 @@ static TString *internshrstr (lua_State *L, const char *str, size_t l) { list = &tb->hash[lmod(h, tb->size)]; /* rehash with new size */ } ts = createstrobj(L, sizestrshr(l), LUA_VSHRSTR, h); - ts->shrlen = cast_byte(l); + ts->shrlen = cast(ls_byte, l); getshrstr(ts)[l] = '\0'; /* ending 0 */ memcpy(getshrstr(ts), str, l * sizeof(char)); ts->u.hnext = *list; @@ -283,7 +283,7 @@ TString *luaS_new (lua_State *L, const char *str) { } -Udata *luaS_newudata (lua_State *L, size_t s, int nuvalue) { +Udata *luaS_newudata (lua_State *L, size_t s, unsigned short nuvalue) { Udata *u; int i; GCObject *o; @@ -301,7 +301,7 @@ Udata *luaS_newudata (lua_State *L, size_t s, int nuvalue) { struct NewExt { - int kind; + ls_byte kind; const char *s; size_t len; TString *ts; /* output */ -- cgit v1.2.3-55-g6feb