Added gcc option '-Wconversion'
No warnings for standard numerical types. Still pending alternative numerical types.
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user