From: Mike Pall Date: Tue, 3 Jul 2012 11:22:30 +0000 (+0200) Subject: Fix compiler warnings. X-Git-Tag: v2.0.0-beta11~141 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=80d0acc7c1e765cee7fc6fb14b7a844d3b28acc4;p=thirdparty%2FLuaJIT.git Fix compiler warnings. --- diff --git a/src/lj_asm.c b/src/lj_asm.c index 8ff3eaf7..15685d85 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c @@ -1558,7 +1558,7 @@ static void asm_setup_regsp(ASMState *as, int sink) if (as->parent) { uint16_t *p; lastir = lj_snap_regspmap(as->parent, as->J->exitno, ir); - as->stopins = (lastir-1) - as->ir; + as->stopins = (IRRef)((lastir-1) - as->ir); for (p = as->parentmap; ir < lastir; ir++) { RegSP rs = ir->prev; *p++ = (uint16_t)rs; /* Copy original parent RegSP to parentmap. */ diff --git a/src/lj_cparse.c b/src/lj_cparse.c index d9f66227..e9826715 100644 --- a/src/lj_cparse.c +++ b/src/lj_cparse.c @@ -225,7 +225,8 @@ static CPToken cp_param(CPState *cp) return CTOK_INTEGER; } else { GCcdata *cd; - if (!tviscdata(o)) lj_err_argtype(cp->L, o-cp->L->base+1, "type parameter"); + if (!tviscdata(o)) + lj_err_argtype(cp->L, (int)(o-cp->L->base)+1, "type parameter"); cd = cdataV(o); if (cd->ctypeid == CTID_CTYPEID) cp->val.id = *(CTypeID *)cdataptr(cd);