* Fix some warnings and build on linux

This commit is contained in:
pancake 2011-05-20 21:04:16 +02:00
parent ef718ce968
commit 98af858f6a
7 changed files with 12 additions and 12 deletions

View File

@ -63,12 +63,12 @@ R_API int r_bp_restore(struct r_bp_t *bp, int set) {
continue;
/* write obytes from every breakpoint in r_bp if not handled by plugin */
if (set) {
eprintf ("Setting bp at 0x%x\n", b->addr);
eprintf ("Setting bp at 0x%08"PFMT64x"\n", b->addr);
if (b->hw || !b->obytes)
eprintf ("hw breakpoints not supported yet\n");
else bp->iob.write_at (bp->iob.io, b->addr, b->obytes, b->size);
} else {
eprintf ("Clearing bp at 0x%x\n", b->addr);
eprintf ("Clearing bp at 0x%08"PFMT64x"\n", b->addr);
if (b->hw || !b->bbytes)
eprintf ("hw breakpoints not supported yet\n");
else bp->iob.write_at (bp->iob.io, b->addr, b->bbytes, b->size);

View File

@ -181,7 +181,7 @@ static int __waitpid(int pid) {
static int fork_and_ptraceme(const char *cmd) {
char **argv;
int status, pid = -1;
int ret, status, pid = -1;
pid = vfork ();
switch (pid) {
@ -212,7 +212,7 @@ static int fork_and_ptraceme(const char *cmd) {
return 0; // invalid pid // if exit is overriden.. :)
default:
/* XXX: clean this dirty code */
wait (&status);
ret = wait (&status);
if (WIFSTOPPED (status))
eprintf ("Process with PID %d started...\n", (int)pid);
if (WEXITSTATUS (status) == MAGIC_EXIT)

View File

@ -1,6 +1,6 @@
OBJ=parse.o
BIN=parse
BINDEPS=r_util r_lib r_parse r_flags r_cons r_anal
BINDEPS=r_util r_lib r_parse r_flags r_cons r_anal r_reg r_syscall r_diff
LIBS+=${DL_LIBS}
include ../../rules.mk

View File

@ -9,7 +9,6 @@ R_API RPrint *r_print_new() {
if (p) {
strcpy (p->datefmt, "%d:%m:%Y %H:%M:%S %z");
p->user = NULL;
p->name = NULL;
r_io_bind_init (p->iob);
p->printf = printf;
p->interrupt = 0;

View File

@ -4,7 +4,7 @@ all: hex fmt
BIN=hex
OBJ=hex.o
BINDEPS=r_cons r_line r_print r_util r_anal r_asm
BINDEPS=r_cons r_line r_print r_util r_anal r_asm r_reg r_syscall r_diff
fmt${EXT_EXE}: fmt.o
${CC} -I../../include fmt.o -L../../util -lr_util ${LDFLAGS} -o fmt${EXT_EXE}

View File

@ -81,7 +81,7 @@ R_API int r_range_add_from_string(RRange *rgs, const char *string) {
char *str = alloca (len);
char *p = str;
char *p2 = NULL;
RRangeItem *r;
RRangeItem *r = NULL;
memcpy (str, string, len);
@ -117,6 +117,7 @@ R_API int r_range_add_from_string(RRange *rgs, const char *string) {
addr = r_num_get (NULL, p);
r = r_range_add (rgs, addr, addr+1, 1);
}
// check r != NULL?
return rgs->changed;
}

View File

@ -10,8 +10,8 @@ int afun(const char *str, int iters) {
int ret;
char *ptr;
if (iters == 0) return 0;
ret = strlen(str)+1;
ptr = alloca(ret);
ret = strlen (str)+1;
ptr = alloca (ret);
memcpy(ptr, str, ret);
return afun(str, iters-1);
}
@ -20,9 +20,9 @@ int fun(const char *str, int iters) {
int ret;
char *ptr;
if (iters == 0) return 0;
ptr = (char *)r_alloca_str(str);
ptr = (char *)r_alloca_str (str);
ret = fun(str, iters-1);
return r_alloca_ret_i( ret );
return r_alloca_ret_i (ret);
}
/* malloc */