From: Chih-Hung Hsieh Date: Thu, 2 Nov 2017 22:22:43 +0000 (-0700) Subject: exynos9610: USB: Use -Werror X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=09fcc59c984329e8359d309fe8352fdd70db24c6;p=GitHub%2Fmoto-9609%2Fandroid_device_motorola_exynos9610-common.git exynos9610: USB: Use -Werror * Remove unused variables. * Return result of registerAsService(). Bug: 66996870 Test: build with WITH_TIDY=1 Change-Id: I79d1add6190e835de20a0b0c247bbbb259096c14 --- 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))) {