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/input/evdev/Android.mk b/modules/input/evdev/Android.mk
index cb12964..df16b53 100644
--- a/modules/input/evdev/Android.mk
+++ b/modules/input/evdev/Android.mk
@@ -55,7 +55,7 @@
     liblog
 
 LOCAL_CLANG := true
-LOCAL_CPPFLAGS += -Wno-unused-parameter
+LOCAL_CPPFLAGS += -Wall -Werror -Wno-unused-parameter
 
 LOCAL_MODULE_TAGS := optional
 
diff --git a/modules/input/evdev/InputDevice.cpp b/modules/input/evdev/InputDevice.cpp
index 5f90982..3b72f1f 100644
--- a/modules/input/evdev/InputDevice.cpp
+++ b/modules/input/evdev/InputDevice.cpp
@@ -95,19 +95,6 @@
     return INPUT_DEVICE_CLASS_JOYSTICK;
 }
 
-static bool getBooleanProperty(const InputProperty& prop) {
-    const char* propValue = prop.getValue();
-    if (propValue == nullptr) return false;
-
-    char* end;
-    int value = std::strtol(propValue, &end, 10);
-    if (*end != '\0') {
-        ALOGW("Expected boolean for property %s; value=%s", prop.getKey(), propValue);
-        return false;
-    }
-    return value;
-}
-
 EvdevDevice::EvdevDevice(InputHostInterface* host, const std::shared_ptr<InputDeviceNode>& node) :
     mHost(host), mDeviceNode(node), mDeviceDefinition(mHost->createDeviceDefinition()) {