]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Avoid compiler warnings.
authorMike Pall <mike>
Wed, 22 Dec 2010 22:20:50 +0000 (23:20 +0100)
committerMike Pall <mike>
Wed, 22 Dec 2010 22:20:50 +0000 (23:20 +0100)
src/lj_crecord.c
src/lj_opt_mem.c

index 1df6c70c39d41364099a25abc898042ff18cebfe..9a317891f1169c7ffa5d35009886f2b1de1de233 100644 (file)
@@ -372,7 +372,7 @@ void LJ_FASTCALL recff_cdata_index(jit_State *J, RecordFFData *rd)
       idx = emitir(IRT(IR_TOINT, IRT_INTP), idx, IRTOINT_ANY);
 #endif
     if (ctype_ispointer(ct->info)) {
-      ptrdiff_t sz = (ptrdiff_t)lj_ctype_size(cts, (sid = ctype_cid(ct->info)));
+      CTSize sz = lj_ctype_size(cts, (sid = ctype_cid(ct->info)));
       idx = crec_reassoc_ofs(J, idx, &ofs, sz);
       idx = emitir(IRT(IR_MUL, IRT_INTP), idx, lj_ir_kintp(J, sz));
       ptr = emitir(IRT(IR_ADD, IRT_PTR), idx, ptr);
index 3ed3c7ee672f3aa354c5583006c379b651513a3f..5aa5d8b9bd3cb8a0c966a7e2704c2016ee48b4a0 100644 (file)
@@ -40,7 +40,7 @@ typedef enum {
 /* Simplified escape analysis: check for intervening stores. */
 static AliasRet aa_escape(jit_State *J, IRIns *ir, IRIns *stop)
 {
-  IRRef ref = ir - J->cur.ir;  /* The reference that might be stored. */
+  IRRef ref = (IRRef)(ir - J->cur.ir);  /* The ref that might be stored. */
   for (ir++; ir < stop; ir++)
     if (ir->op2 == ref &&
        (ir->o == IR_ASTORE || ir->o == IR_HSTORE ||