Merge "Use -Werror in external/libusb" am: 15c76ed42c am: 5b61229604 am: 15e935a03c
am: c91766be13

Change-Id: I0dcf331cdf313d7c95bacf1b2568219cb1e935fb
diff --git a/Android.bp b/Android.bp
index 2ca1b99..7d2ea31 100644
--- a/Android.bp
+++ b/Android.bp
@@ -16,6 +16,12 @@
         "libusb/os",
     ],
 
+    cflags: [
+        "-Wall",
+        "-Wno-error=sign-compare",
+        "-Wno-error=switch",
+    ],
+
     target: {
         android: {
             srcs: [
@@ -28,6 +34,8 @@
             local_include_dirs: [
                 "android",
             ],
+
+            cflags: ["-Werror"],
         },
 
         darwin: {
@@ -46,6 +54,8 @@
                 "-framework IOKit",
                 "-lobjc"
             ],
+
+            // cflags: ["-Werror"], // still has warnings
         },
 
         linux_glibc: {
@@ -59,6 +69,8 @@
             local_include_dirs: [
                 "linux",
             ],
+
+            cflags: ["-Werror"],
         },
 
         windows: {
@@ -74,6 +86,8 @@
                 "windows",
             ],
 
+            cflags: ["-Werror"],
+
             // Not working yet.
             enabled: false,
         },