diff options
Diffstat (limited to 'debuggerd/crasher.c')
-rw-r--r-- | debuggerd/crasher.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/debuggerd/crasher.c b/debuggerd/crasher.c index 3e3ab5a..01ce0be 100644 --- a/debuggerd/crasher.c +++ b/debuggerd/crasher.c @@ -6,13 +6,18 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <sys/cdefs.h> #include <sys/ptrace.h> #include <sys/socket.h> #include <sys/wait.h> #include <unistd.h> -#include <cutils/log.h> #include <cutils/sockets.h> +#include <log/log.h> + +#ifndef __unused +#define __unused __attribute__((__unused__)) +#endif extern const char* __progname; @@ -26,7 +31,7 @@ static void maybe_abort() { } } -static int smash_stack(int i) { +static int smash_stack(int i __unused) { printf("crasher: deliberately corrupting stack...\n"); // Unless there's a "big enough" buffer on the stack, gcc // doesn't bother inserting checks. @@ -47,11 +52,6 @@ __attribute__((noinline)) static void overflow_stack(void* p) { overflow_stack(&buf); } -static void test_call1() -{ - *((int*) 32) = 1; -} - static void *noisy(void *x) { char c = (uintptr_t) x; |