From 9368fc7253eb54e2fe651534dde88fd0eb8afb88 Mon Sep 17 00:00:00 2001 From: pancake Date: Wed, 2 Jul 2014 17:14:32 +0200 Subject: [PATCH] Bump capstone again and fix some warns --- libr/anal/meta.c | 3 ++- libr/anal/reflines.c | 1 - libr/bin/format/mach0/mach0.c | 8 +++----- libr/bin/p/bin_p9.c | 2 +- shlr/Makefile | 3 +-- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/libr/anal/meta.c b/libr/anal/meta.c index f29fca098a..96890d8cf7 100644 --- a/libr/anal/meta.c +++ b/libr/anal/meta.c @@ -200,7 +200,8 @@ R_API RAnalMetaItem *r_meta_find(RAnal *a, ut64 off, int type, int where) { } //char *range = get_in_range (off); if (type == R_META_TYPE_ANY) { - char *p, key [100]; + const char *p; + char key [100]; snprintf (key, sizeof (key)-1, "meta.0x%"PFMT64x, off); p = sdb_const_get (DB, key, 0); // XXX: TODO unimplemented. see core/disasm.c:1070 diff --git a/libr/anal/reflines.c b/libr/anal/reflines.c index 6409e81735..266453674e 100644 --- a/libr/anal/reflines.c +++ b/libr/anal/reflines.c @@ -11,7 +11,6 @@ R_API struct r_anal_refline_t *r_anal_reflines_get(struct r_anal_t *anal, RAnalOp op = {0}; const ut8 *ptr = buf; const ut8 *end = buf + len; - ut64 bytes_consumed = 0; ut64 opc = addr; int sz = 0, index = 0; diff --git a/libr/bin/format/mach0/mach0.c b/libr/bin/format/mach0/mach0.c index ce9ac282d6..41314edafe 100644 --- a/libr/bin/format/mach0/mach0.c +++ b/libr/bin/format/mach0/mach0.c @@ -7,7 +7,6 @@ static ut64 MACH0_(r_bin_mach0_vaddr_to_baddr)(struct MACH0_(r_bin_mach0_obj_t)* bin, ut64 addr) { ut64 section_base, section_size; -ut64 oaddr = addr; int i, min = -1; if (!bin->sects) @@ -19,11 +18,10 @@ ut64 oaddr = addr; continue; if (addrsects[i].addr) { min = i; -addr = bin->sects[i].addr & 0xffffffffFFFF0000; + addr = bin->sects[i].addr & 0xffffffffFFFF0000; } } } -//if (min != -1) { addr += oaddr; } for (i = 0; i < bin->nsects; i++) { section_base = (ut64)bin->sects[i].addr; section_size = (ut64)bin->sects[i].size; @@ -936,8 +934,8 @@ struct r_bin_mach0_addr_t* MACH0_(r_bin_mach0_get_entrypoint)(struct MACH0_(r_bi return NULL; if (!(entry = malloc (sizeof (struct r_bin_mach0_addr_t)))) return NULL; -// hack to bypass this test -bin->entry = NULL; + // hack to bypass this test + bin->entry = 0LL; if (bin->entry) { entry->offset = MACH0_(r_bin_mach0_addr_to_offset)(bin, bin->entry); entry->addr = bin->entry; diff --git a/libr/bin/p/bin_p9.c b/libr/bin/p/bin_p9.c index 89200ad29e..2892983c52 100644 --- a/libr/bin/p/bin_p9.c +++ b/libr/bin/p/bin_p9.c @@ -29,7 +29,7 @@ static Sdb* get_sdb (RBinObject *o) { } static void * load_bytes(const ut8 *buf, ut64 sz, ut64 loadaddr, Sdb *sdb){ - return check_bytes (buf, sz); + return (size_t)check_bytes (buf, sz); } static int load(RBinFile *arch) { diff --git a/shlr/Makefile b/shlr/Makefile index 178485659d..6724bd593b 100644 --- a/shlr/Makefile +++ b/shlr/Makefile @@ -9,8 +9,7 @@ CS_URL=https://github.com/aquynh/capstone.git CS_UPD=20140617 CS_BRA=next #CS_TIP=5a7f409dec06859ad28ee577d404a501b7d380c8 -CS_TIP=ed6b8c5a96579e3907f7b2b9d8d0d9efa7e134df -CS_TIP=22ea683583adbbc344989f83fdc3f5c618756eaa +CS_TIP=d392f6ef89f258ea7c3a166131e08ae2c2ff99ef .PHONY: capstone-sync capstone-build all clean mrproper libgdbr