Fix compiler warnings.

master
Mike Pall 2014-01-20 16:48:33 +01:00
parent 926686ad3d
commit 3db3cc10ff
2 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ LJLIB_ASM(string_byte) LJLIB_REC(string_range 0)
LJLIB_ASM(string_char)
{
int i, nargs = (int)(L->top - L->base);
char *buf = lj_str_needbuf(L, &G(L)->tmpbuf, (size_t)nargs);
char *buf = lj_str_needbuf(L, &G(L)->tmpbuf, (MSize)nargs);
for (i = 1; i <= nargs; i++) {
int32_t k = lj_lib_checkint(L, i);
if (!checku8(k))

View File

@ -29,7 +29,7 @@ static LJ_AINLINE uint32_t cconv_idx(CTInfo info)
uint32_t idx = ((info >> 26) & 15u); /* Dispatch bits. */
lua_assert(ctype_type(info) <= CT_MAYCONVERT);
#if LJ_64
idx = ((U64x(f436fff5,fff7f021) >> 4*idx) & 15u);
idx = ((uint32_t)(U64x(f436fff5,fff7f021) >> 4*idx) & 15u);
#else
idx = (((idx < 8 ? 0xfff7f021u : 0xf436fff5) >> 4*(idx & 7u)) & 15u);
#endif