Use -Werror in external/libusb
* Keep sign-compare and swtich warnings, to be fixed later
* Has not fixed all warnings for darwin target yet.
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: Ie75372f2bd62cb69933fed8bffee5332b23af8a3
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,
},