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/nfc/Android.bp b/modules/nfc/Android.bp
index b4bc9b1..7c69f11 100644
--- a/modules/nfc/Android.bp
+++ b/modules/nfc/Android.bp
@@ -17,6 +17,7 @@
     relative_install_path: "hw",
     proprietary: true,
     srcs: ["nfc_pn544_example.c"],
+    cflags: ["-Wall", "-Werror"],
     header_libs: ["libhardware_headers"],
     shared_libs: [
         "liblog",