Turn on -Wunused and fix the mistakes it uncovers.

Change-Id: I023d2d8b547fbc21d4124bb7510d42b06a0dc501
diff --git a/libc/Android.mk b/libc/Android.mk
index 4783bd3..02fad3b 100644
--- a/libc/Android.mk
+++ b/libc/Android.mk
@@ -486,7 +486,7 @@
 # ========================================================
 libc_common_cflags := \
     -D_LIBC=1 \
-    -Wall -Wextra \
+    -Wall -Wextra -Wunused \
 
 # Try to catch typical 32-bit assumptions that break with 64-bit pointers.
 libc_common_cflags += \
@@ -709,7 +709,7 @@
 LOCAL_SRC_FILES := $(libc_upstream_openbsd_src_files)
 LOCAL_CFLAGS := \
     $(libc_common_cflags) \
-    -Wno-sign-compare -Wno-uninitialized \
+    -Wno-sign-compare -Wno-uninitialized -Wno-unused-parameter \
     -Werror \
     -I$(LOCAL_PATH)/upstream-openbsd/android/include \
     -I$(LOCAL_PATH)/upstream-openbsd/lib/libc/include \
diff --git a/libc/bionic/libc_init_dynamic.cpp b/libc/bionic/libc_init_dynamic.cpp
index 659cf39..7c46364 100644
--- a/libc/bionic/libc_init_dynamic.cpp
+++ b/libc/bionic/libc_init_dynamic.cpp
@@ -94,7 +94,7 @@
 // Note that the dynamic linker has also run all constructors in the
 // executable at this point.
 __noreturn void __libc_init(void* raw_args,
-                            void (*onexit)(void),
+                            void (*onexit)(void) __unused,
                             int (*slingshot)(int, char**, char**),
                             structors_array_t const * const structors) {
 
diff --git a/libc/bionic/libc_init_static.cpp b/libc/bionic/libc_init_static.cpp
index e45422e..ab0b3a6 100644
--- a/libc/bionic/libc_init_static.cpp
+++ b/libc/bionic/libc_init_static.cpp
@@ -85,7 +85,7 @@
 }
 
 __noreturn void __libc_init(void* raw_args,
-                            void (*onexit)(void),
+                            void (*onexit)(void) __unused,
                             int (*slingshot)(int, char**, char**),
                             structors_array_t const * const structors) {
   KernelArgumentBlock args(raw_args);