Use -Werror in hardware/libhardware/modules

* Remove unused local variables.
* Remove or comment out unused static functions.
* Fix trivial bugs found by unused value warnings.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I99389b883c89551850180d25241a35a40bb77b26
diff --git a/modules/hwcomposer/hwcomposer.cpp b/modules/hwcomposer/hwcomposer.cpp
index 31e362a..cc0d873 100644
--- a/modules/hwcomposer/hwcomposer.cpp
+++ b/modules/hwcomposer/hwcomposer.cpp
@@ -55,6 +55,7 @@
 
 /*****************************************************************************/
 
+#if 0
 static void dump_layer(hwc_layer_1_t const* l) {
     ALOGD("\ttype=%d, flags=%08x, handle=%p, tr=%02x, blend=%04x, {%d,%d,%d,%d}, {%d,%d,%d,%d}",
             l->compositionType, l->flags, l->handle, l->transform, l->blending,
@@ -67,6 +68,7 @@
             l->displayFrame.right,
             l->displayFrame.bottom);
 }
+#endif
 
 static int hwc_prepare(hwc_composer_device_1_t * /*dev*/,
         size_t /*numDisplays*/, hwc_display_contents_1_t** displays) {