summaryrefslogtreecommitdiff
path: root/usb
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2017-11-07 10:41:57 -0800
committerChih-Hung Hsieh <chh@google.com>2017-11-07 10:41:57 -0800
commitacc25864006bcf52d4d317bf09ff4334efc06737 (patch)
treeb0b7ef36aa21d2a7664c99490065b0158470e9cb /usb
parent75c9c5884ac957ed67ede794957b0b9e95231e15 (diff)
Use -Werror in device/google/marlin/usb
* Remove unused local variables. Bug: 66996870 Test: build with WITH_TIDY=1 Change-Id: Ide7ab73dc874d48fc88e3ff573f953ae2d62eddb
Diffstat (limited to 'usb')
-rw-r--r--usb/Android.bp1
-rw-r--r--usb/Usb.cpp2
2 files changed, 1 insertions, 2 deletions
diff --git a/usb/Android.bp b/usb/Android.bp
index b8db9ff8..2f13b54e 100644
--- a/usb/Android.bp
+++ b/usb/Android.bp
@@ -17,6 +17,7 @@ cc_binary {
relative_install_path: "hw",
init_rc: ["android.hardware.usb@1.1-service.marlin.rc"],
srcs: ["service.cpp", "Usb.cpp"],
+ cflags: ["-Wall", "-Werror"],
shared_libs: [
"libbase",
"libhidlbase",
diff --git a/usb/Usb.cpp b/usb/Usb.cpp
index 601c70b5..dbb98f44 100644
--- a/usb/Usb.cpp
+++ b/usb/Usb.cpp
@@ -331,8 +331,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))) {