exynos9610: USB: Use -Werror
authorChih-Hung Hsieh <chh@google.com>
Thu, 2 Nov 2017 22:22:43 +0000 (15:22 -0700)
committerJan Altensen <info@stricted.net>
Sun, 1 Nov 2020 02:06:30 +0000 (03:06 +0100)
* Remove unused variables.
* Return result of registerAsService().

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I79d1add6190e835de20a0b0c247bbbb259096c14

hidl/usb/Android.bp
hidl/usb/Usb.cpp

index 4370d6c7c9c7d0244155deddda6f3372990b0dc2..f5bde70af77140a2f45af1db7fae8f963113b95e 100644 (file)
@@ -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",
index 7b084500cde2325235f56e31e5b852fe2cde751f..5f8bdce4da149c511a494a528380119a39834935 100644 (file)
@@ -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))) {