Fix some compiler warnings.

This commit is contained in:
Mike Pall 2010-08-03 23:11:12 +02:00
parent 309d8f5aab
commit 0a3329c581

View File

@ -620,10 +620,11 @@ static BCPos bcemit_jmp(FuncState *fs)
{
BCPos jpc = fs->jpc;
BCPos j = fs->pc - 1;
BCIns *ip = &fs->bcbase[j].ins;
fs->jpc = NO_JMP;
if ((int32_t)j >= (int32_t)fs->lasttarget &&
bc_op(fs->bcbase[j].ins) == BC_UCLO)
setbc_j(&fs->bcbase[j].ins, NO_JMP);
bc_op(*ip) == BC_UCLO)
setbc_j(ip, NO_JMP);
else
j = bcemit_AJ(fs, BC_JMP, fs->freereg, NO_JMP);
jmp_append(fs, &j, jpc);
@ -1378,10 +1379,11 @@ static void expr_table(LexState *ls, ExpDesc *e)
e->k = VNONRELOC; /* May have been changed by expr_index. */
}
if (!t) { /* Construct TNEW RD: hhhhhaaaaaaaaaaa. */
BCIns *ip = &fs->bcbase[pc].ins;
if (!needarr) narr = 0;
else if (narr < 3) narr = 3;
else if (narr > 0x7ff) narr = 0x7ff;
setbc_d(&fs->bcbase[pc].ins, (uint32_t)narr|(hsize2hbits(nhash)<<11));
setbc_d(ip, (uint32_t)narr|(hsize2hbits(nhash)<<11));
}
}