Fix two enum-cast warnings

This commit is contained in:
pancake 2014-09-20 15:21:25 +02:00
parent 143033b5d6
commit 99b8dab78b
2 changed files with 4 additions and 2 deletions

View File

@ -59,6 +59,8 @@ static ut64 is_pointer(RIOBind *iob, const ut8 *buf, int endian, int size) {
// optimization to ignore very low and very high pointers
// this makes disasm 5x faster, but can result in some false positives
// we should compare with current offset, to avoid
// short/long references. and discard invalid ones
if (n<0x1000) return 0; // probably wrong
if (n>0xffffffffffffLL) return 0; // probably wrong

View File

@ -96,7 +96,7 @@ R_API int r_anal_esil_set_op (RAnalEsil *esil, const char *op, RAnalEsilOp code)
return R_FALSE;
}
h = sdb_itoa (sdb_hash (op), t, 16);
sdb_num_set (esil->ops, h, (ut64)code, 0);
sdb_num_set (esil->ops, h, (ut64)(size_t)code, 0);
if (!sdb_num_exists (esil->ops, h))
eprintf ("can't set esil-op %s\n", op);
return R_TRUE;
@ -2241,7 +2241,7 @@ static int iscommand (RAnalEsil *esil, const char *word, RAnalEsilOp *op) {
char *h;
h = sdb_itoa (sdb_hash (word), t, 16);
if (sdb_num_exists (esil->ops, h)) {
*op = (RAnalEsilOp) sdb_num_get (esil->ops, h, 0);
*op = (RAnalEsilOp) (size_t)sdb_num_get (esil->ops, h, 0);
return R_TRUE;
}
return R_FALSE;