Use -Werror in system/extras
* Use system-extras-cflags-defaults
* Move -Wall -Werror from cppflags to cflags
* fix warning on redefinition of MAX_PATH
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: Ib14b4d8eece767225a6fef639ed190b343678c00
diff --git a/ext4_utils/Android.bp b/ext4_utils/Android.bp
index 7bc2f00..ff17edb 100644
--- a/ext4_utils/Android.bp
+++ b/ext4_utils/Android.bp
@@ -2,6 +2,7 @@
cc_library {
name: "libext4_utils",
+ defaults: ["system-extras-cflags-defaults"],
host_supported: true,
srcs: [
"make_ext4fs.c",
diff --git a/ext4_utils/make_ext4fs.c b/ext4_utils/make_ext4fs.c
index 2eeddb5..e550ac2 100644
--- a/ext4_utils/make_ext4fs.c
+++ b/ext4_utils/make_ext4fs.c
@@ -84,6 +84,7 @@
#endif
+#undef MAX_PATH
#define MAX_PATH 4096
#define MAX_BLK_MAPPING_STR 1000