mirror of
https://github.com/sstefani/mtrace.git
synced 2025-12-07 17:26:44 +08:00
fixes for ubuntu 12.04
fix some compiler complains
This commit is contained in:
parent
376bcb2581
commit
96cd4a6ce8
@ -246,8 +246,12 @@ char **process_options(int argc, char **argv)
|
|||||||
char *output = NULL;
|
char *output = NULL;
|
||||||
char *cwd = NULL;
|
char *cwd = NULL;
|
||||||
|
|
||||||
if (!sockdef)
|
if (!sockdef) {
|
||||||
asprintf(&sockdef, "/tmp/mtrace%u.sock", getuid());
|
if (asprintf(&sockdef, "/tmp/mtrace%u.sock", getuid()) == -1) {
|
||||||
|
fprintf(stderr, "%s\n", strerror(errno));
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
progname = argv[0];
|
progname = argv[0];
|
||||||
|
|
||||||
|
|||||||
@ -272,7 +272,7 @@ void *mem_scan(struct task *task, struct mt_msg *cmd, void *payload, unsigned lo
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (do_peek) {
|
if (do_peek) {
|
||||||
if (copy_from_proc(task, ARCH_ADDR_T(start), page_buf, sizeof(page_buf)) != sizeof(page_buf)) {
|
if (copy_from_proc(task, ARCH_ADDR_T(start), page_buf, sizeof(page_buf)) != (int)sizeof(page_buf)) {
|
||||||
fprintf(stderr, "ptrace (%s)\n", strerror(errno));
|
fprintf(stderr, "ptrace (%s)\n", strerror(errno));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user