summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2017-11-02 15:22:43 -0700
committerJan Altensen <info@stricted.net>2021-05-04 02:41:18 +0200
commit45561bafb2e2e63859b30f15013acdffc7cbd0ff (patch)
tree37e785cd23f5b4e0f80a2517cae13a1abd42c7bb
parent802a54bd8ebee4ab25cbdd7d2dbccf84657b8931 (diff)
lineage/interfaces: USB: Use -Werror
* Remove unused variables. * Return result of registerAsService(). Bug: 66996870 Test: build with WITH_TIDY=1 Change-Id: I79d1add6190e835de20a0b0c247bbbb259096c14
-rw-r--r--usb/1.1-typec/Android.bp4
-rw-r--r--usb/1.1-typec/Usb.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/usb/1.1-typec/Android.bp b/usb/1.1-typec/Android.bp
index 4370d6c..f5bde70 100644
--- a/usb/1.1-typec/Android.bp
+++ b/usb/1.1-typec/Android.bp
@@ -17,6 +17,10 @@ cc_binary {
relative_install_path: "hw",
init_rc: ["android.hardware.usb@1.1-service.wahoo.rc"],
srcs: ["service.cpp", "Usb.cpp"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
shared_libs: [
"libbase",
"libhidlbase",
diff --git a/usb/1.1-typec/Usb.cpp b/usb/1.1-typec/Usb.cpp
index 7b08450..5f8bdce 100644
--- a/usb/1.1-typec/Usb.cpp
+++ b/usb/1.1-typec/Usb.cpp
@@ -380,8 +380,6 @@ Status getTypeCPortNamesHelper(std::unordered_map<std::string, bool> *names) {
dp = opendir("/sys/class/typec");
if (dp != NULL) {
- int32_t ports = 0;
- int32_t current = 0;
struct dirent *ep;
while ((ep = readdir(dp))) {