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/trace.cc b/src/trace.cc
index 6648b85..61dd163 100644
--- a/src/trace.cc
+++ b/src/trace.cc
@@ -145,8 +145,8 @@
   return true;
 }
 
-static void TraceRestoreStack(Thread* t, void*) {
 #if defined(__arm__)
+static void TraceRestoreStack(Thread* t, void*) {
   uintptr_t trace_exit = reinterpret_cast<uintptr_t>(art_trace_exit_from_code);
 
   Frame frame = t->GetTopOfStack();
@@ -164,10 +164,12 @@
       }
     }
   }
-#else
-  UNIMPLEMENTED(WARNING);
-#endif
 }
+#else
+static void TraceRestoreStack(Thread*, void*) {
+  UNIMPLEMENTED(WARNING);
+}
+#endif
 
 void Trace::AddSavedCodeToMap(const Method* method, const void* code) {
   saved_code_map_.insert(std::make_pair(method, code));
@@ -187,16 +189,18 @@
   }
 }
 
-void Trace::SaveAndUpdateCode(Method* method) {
 #if defined(__arm__)
+void Trace::SaveAndUpdateCode(Method* method) {
   void* trace_stub = reinterpret_cast<void*>(art_trace_entry_from_code);
   CHECK(GetSavedCodeFromMap(method) == NULL);
   AddSavedCodeToMap(method, method->GetCode());
   method->SetCode(trace_stub);
-#else
-  UNIMPLEMENTED(WARNING);
-#endif
 }
+#else
+void Trace::SaveAndUpdateCode(Method*) {
+  UNIMPLEMENTED(WARNING);
+}
+#endif
 
 void Trace::ResetSavedCode(Method* method) {
   CHECK(GetSavedCodeFromMap(method) != NULL);
@@ -210,6 +214,11 @@
     return;
   }
 
+  // TODO: implement alloc counting.
+  if (flags != 0) {
+    UNIMPLEMENTED(FATAL) << "trace flags";
+  }
+
   ScopedThreadStateChange tsc(Thread::Current(), Thread::kRunnable);
   Runtime::Current()->GetThreadList()->SuspendAll(false);