debuggerd: turn on -Werror
- Deal with some -Wunused / -Wunused-variable issues
Change-Id: I39849fe30170f69d1cab7d4ad2629b3a49e14ee7
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 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 @@
overflow_stack(&buf);
}
-static void test_call1()
-{
- *((int*) 32) = 1;
-}
-
static void *noisy(void *x)
{
char c = (uintptr_t) x;