Skip to content

Commit

Permalink
Fix more warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Mar 13, 2017
1 parent a966076 commit 8f32309
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions libr/core/cbin.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ static int save_ptr(void *p, const char *k, const char *v) {
sdbs[1] = ((Sdb**) p)[1];
if (!strncmp (v, "cc", strlen ("cc") + 1)) {
const char *x = sdb_const_get (sdbs[1], sdb_fmt (-1, "cc.%s.name", k), 0);
char *tmp = sdb_fmt (-1, "0x%08"PFMT64x, (ut64)x);
char *tmp = sdb_fmt (-1, "%p", x);
sdb_set (sdbs[0], tmp, x, 0);
}
return 1;
Expand Down Expand Up @@ -570,7 +570,7 @@ R_API void r_core_anal_cc_init(RCore *core) {
RListIter *it;
RAnalFunction *fcn;
r_list_foreach (core->anal->fcns, it, fcn) {
char *ptr = sdb_fmt (-1, "0x%08"PFMT64x, (ut64)fcn->cc);
char *ptr = sdb_fmt (-1, "%p", fcn->cc);
const char *cc = sdb_const_get (sdbs[0], ptr, 0);
if (cc) {
fcn->cc = r_anal_cc_to_constant (core->anal, (char *)cc);
Expand Down
6 changes: 3 additions & 3 deletions libr/core/cmd_zign.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

static int cmd_zign(void *data, const char *input);

static void fcn_zig_add(RSignItem *si, int idx, ut8 *addr, const char *prefix) {
static void fcn_zig_add(RSignItem *si, int idx, ut64 addr, const char *prefix) {
const int type = si->type;
if (type == 'f') {
r_cons_printf ("f %s.fun_%s_%d @ 0x%08"PFMT64x"\n", prefix, si->name, idx, addr);
Expand Down Expand Up @@ -63,7 +63,7 @@ static bool fcn_zig_search(RCore *core, ut64 ini, ut64 fin) {
}
si = r_sign_check (core->sign, buf + idx, len - idx);
if (si) {
fcn_zig_add (si, count, (ut8 *)ini + idx, prefix);
fcn_zig_add (si, count, ini + idx, prefix);
eprintf ("- Found %d matching function signatures\r", count);
count++;
}
Expand Down Expand Up @@ -403,7 +403,7 @@ static int cmd_zign(void *data, const char *input) {
if (si) {
old_fs = core->flags->space_idx;
r_cons_printf ("fs sign\n");
fcn_zig_add (si, count, (ut8 *)fcni->addr, r_config_get (core->config, "zign.prefix"));
fcn_zig_add (si, count, fcni->addr, r_config_get (core->config, "zign.prefix"));
r_cons_printf ("fs %s\n", (old_fs == -1) ? "*" : core->flags->spaces[old_fs]);
count++;
}
Expand Down

0 comments on commit 8f32309

Please sign in to comment.