Use -Werror in frameworks/native/cmds

* Remove or comment out unused variables/functions.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I15a463eb9a20bc12787c104f671063ceeafaa1cc
diff --git a/cmds/dumpsys/tests/Android.bp b/cmds/dumpsys/tests/Android.bp
index 127e0f3..39fcb80 100644
--- a/cmds/dumpsys/tests/Android.bp
+++ b/cmds/dumpsys/tests/Android.bp
@@ -4,6 +4,7 @@
     test_suites: ["device-tests"],
 
     srcs: ["dumpsys_test.cpp"],
+    cflags: ["-Wall", "-Werror"],
 
     shared_libs: [
         "libbase",