From 25eb19ba58d880184ecc6a6d9a91f39faac606fc Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Thu, 2 Nov 2017 15:22:43 -0700 Subject: [PATCH] exynos9610: USB: Use -Werror * Remove unused variables. * Return result of registerAsService(). Bug: 66996870 Test: build with WITH_TIDY=1 Change-Id: I79d1add6190e835de20a0b0c247bbbb259096c14 --- hidl/usb/Android.bp | 4 ++++ hidl/usb/Usb.cpp | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hidl/usb/Android.bp b/hidl/usb/Android.bp index 4370d6c..f5bde70 100644 --- a/hidl/usb/Android.bp +++ b/hidl/usb/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/hidl/usb/Usb.cpp b/hidl/usb/Usb.cpp index 7b08450..5f8bdce 100644 --- a/hidl/usb/Usb.cpp +++ b/hidl/usb/Usb.cpp @@ -380,8 +380,6 @@ Status getTypeCPortNamesHelper(std::unordered_map *names) { dp = opendir("/sys/class/typec"); if (dp != NULL) { - int32_t ports = 0; - int32_t current = 0; struct dirent *ep; while ((ep = readdir(dp))) { -- 2.20.1