Fix all our unused parameter warnings so we let GCC report them.

There were a couple of genuine bugs here (fixed), plus there's a missing
feature in trace.cc that I've just added a TODO for.

Also note that I haven't touched the compilers; this warning is still
explicitly disabled for that code. I'll do that when there's less going
on in those directories.

Change-Id: Ic3570bf82411a07c7530bfaf1995ac995b9fc00f
diff --git a/src/mutex.cc b/src/mutex.cc
index 340a075..01aeff4 100644
--- a/src/mutex.cc
+++ b/src/mutex.cc
@@ -27,7 +27,8 @@
 
 namespace art {
 
-static inline void CheckSafeToLockOrUnlock(MutexRank rank, bool is_locking) {
+static inline void CheckSafeToLockOrUnlock(MutexRank __attribute__((unused)) rank,
+                                           bool __attribute__((unused)) is_locking) {
 #ifndef NDEBUG
   if (rank == -1) {
     return;
@@ -39,7 +40,7 @@
 #endif
 }
 
-static inline void CheckSafeToWait(MutexRank rank) {
+static inline void CheckSafeToWait(MutexRank __attribute__((unused)) rank) {
 #ifndef NDEBUG
   Thread* self = Thread::Current();
   if (self != NULL) {