diff options
author | Chih-Hung Hsieh <chh@google.com> | 2017-11-02 15:22:43 -0700 |
---|---|---|
committer | Chih-Hung Hsieh <chh@google.com> | 2017-11-02 15:26:20 -0700 |
commit | 7d0bdbefcdb85353c5f53b9240dd6049b222139a (patch) | |
tree | 493ea997a49582031e728236201aae469f9b9f7b /usb | |
parent | 1898ea64c2f9f67a70bd19a7c8766cd995475c40 (diff) | |
download | wahoo-7d0bdbefcdb85353c5f53b9240dd6049b222139a.tar.gz |
Use -Werror in device/google/wahoo
* Remove unused variables.
* Return result of registerAsService().
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I79d1add6190e835de20a0b0c247bbbb259096c14
Diffstat (limited to 'usb')
-rw-r--r-- | usb/Android.bp | 4 | ||||
-rw-r--r-- | usb/Usb.cpp | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/usb/Android.bp b/usb/Android.bp index 4370d6c7..f5bde70a 100644 --- a/usb/Android.bp +++ b/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/usb/Usb.cpp b/usb/Usb.cpp index 3fc188e6..5f63414f 100644 --- a/usb/Usb.cpp +++ b/usb/Usb.cpp @@ -357,8 +357,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))) { |