mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-14 08:49:50 +00:00
Fix two enum-cast warnings
This commit is contained in:
parent
143033b5d6
commit
99b8dab78b
@ -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
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user