Use -Werror in hardware/libhardware

* Remove unused local variables and function.
* Fix unused return value warning.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I269eca76cda2222c7a0176e85e92df0bb0924a0e
diff --git a/modules/vibrator/Android.bp b/modules/vibrator/Android.bp
index fdbfd61..13ffc83 100644
--- a/modules/vibrator/Android.bp
+++ b/modules/vibrator/Android.bp
@@ -21,5 +21,6 @@
     proprietary: true,
     header_libs: ["libhardware_headers"],
     srcs: ["vibrator.c"],
+    cflags: ["-Wall", "-Werror"],
     shared_libs: ["liblog"],
 }