From: Christopher Ferris Date: Thu, 23 Feb 2017 23:36:54 +0000 (-0800) Subject: AOSP: Disable macro redefined warnings. X-Git-Tag: v1.44.0-rc1~89 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=1333f2b35fa4e2bd3da9ebdfff13b9ba0f9cbc08;p=tools%2Fe2fsprogs.git AOSP: Disable macro redefined warnings. The new kernel headers do: #define __bitwise __bitwise__ However, the code redefines __bitwise without undef'ing it first. This is a temporary fix, b/35721782 filed to fix this. Change-Id: I2c6a64146966f1737835f012d24ccc844570d02b Test: Builds without warningers/errors. From AOSP commit: commit 91581e8f15b8a29aedea3e7c11162301c7e66ec3 Signed-off-by: Theodore Ts'o --- diff --git a/contrib/Android.bp b/contrib/Android.bp index 585a8f1..c2d5cd9 100644 --- a/contrib/Android.bp +++ b/contrib/Android.bp @@ -10,7 +10,7 @@ cc_binary { host_supported: true, srcs: ["fsstress.c"], - cflags: ["-W", "-Wall"], + cflags: ["-W", "-Wall", "-Wno-macro-redefined"], system_shared_libs: ["libc"], target: { @@ -28,7 +28,7 @@ cc_binary { host_supported: true, srcs: ["add_ext4_encrypt.c"], - cflags: ["-W", "-Wall"], + cflags: ["-W", "-Wall", "-Wno-macro-redefined"], shared_libs: [ "libext2fs", "libext2_com_err", diff --git a/debugfs/Android.bp b/debugfs/Android.bp index b60b453..013a421 100644 --- a/debugfs/Android.bp +++ b/debugfs/Android.bp @@ -34,6 +34,7 @@ cc_defaults { cflags: [ "-W", "-Wall", + "-Wno-macro-redefined", "-fno-strict-aliasing", "-DDEBUGFS", ], diff --git a/e2fsck/Android.bp b/e2fsck/Android.bp index 0e1f9b8..1cabe86 100644 --- a/e2fsck/Android.bp +++ b/e2fsck/Android.bp @@ -34,7 +34,7 @@ cc_defaults { "readahead.c", "extents.c", ], - cflags: ["-W", "-Wall", "-fno-strict-aliasing"], + cflags: ["-W", "-Wall", "-Wno-macro-redefined", "-fno-strict-aliasing"], } e2fsck_libs = [ diff --git a/lib/blkid/Android.bp b/lib/blkid/Android.bp index 9a3f276..9b385f9 100644 --- a/lib/blkid/Android.bp +++ b/lib/blkid/Android.bp @@ -24,6 +24,7 @@ cc_library { "-W", "-Wall", "-fno-strict-aliasing", + "-Wno-macro-redefined", ], header_libs: ["libext2-headers"], diff --git a/lib/e2p/Android.bp b/lib/e2p/Android.bp index 9c344df..db51670 100644 --- a/lib/e2p/Android.bp +++ b/lib/e2p/Android.bp @@ -32,6 +32,7 @@ cc_library { cflags: [ "-W", "-Wall", + "-Wno-macro-redefined", ], header_libs: ["libext2-headers"], diff --git a/lib/ext2fs/Android.bp b/lib/ext2fs/Android.bp index 73b11a3..df07a9b 100644 --- a/lib/ext2fs/Android.bp +++ b/lib/ext2fs/Android.bp @@ -97,6 +97,7 @@ cc_library { "-W", "-Wall", "-Wno-unused-parameter", + "-Wno-macro-redefined", ], target: { host: { diff --git a/lib/support/Android.bp b/lib/support/Android.bp index 11248b4..24414a4 100644 --- a/lib/support/Android.bp +++ b/lib/support/Android.bp @@ -25,6 +25,7 @@ cc_library { cflags: [ "-W", "-Wall", + "-Wno-macro-redefined", ], header_libs: ["libext2-headers"], diff --git a/misc/Android.bp b/misc/Android.bp index f75c9d1..e36bf93 100644 --- a/misc/Android.bp +++ b/misc/Android.bp @@ -9,7 +9,7 @@ cc_library { srcs: [ "create_inode.c", ], - cflags: ["-W", "-Wall"], + cflags: ["-W", "-Wall", "-Wno-macro-redefined"], shared_libs: [ "libext2_quota", "libext2fs", @@ -32,7 +32,7 @@ cc_binary { "default_profile.c", "create_inode.c", ], - cflags: ["-W", "-Wall"], + cflags: ["-W", "-Wall", "-Wno-macro-redefined"], shared_libs: [ "libext2fs", "libext2_blkid", @@ -58,6 +58,7 @@ cc_defaults { "-W", "-Wall", "-DNO_RECOVERY", + "-Wno-macro-redefined", ], include_dirs: ["external/e2fsprogs/e2fsck"], } @@ -104,7 +105,7 @@ cc_binary { host_supported: true, srcs: ["badblocks.c"], - cflags: ["-W", "-Wall"], + cflags: ["-W", "-Wall", "-Wno-macro-redefined"], shared_libs: [ "libext2fs", "libext2_com_err", @@ -123,7 +124,7 @@ cc_binary { host_supported: true, srcs: ["chattr.c"], - cflags: ["-W", "-Wall"], + cflags: ["-W", "-Wall", "-Wno-macro-redefined"], shared_libs: [ "libext2_com_err", "libext2_e2p", @@ -137,7 +138,7 @@ cc_binary { cc_defaults { name: "lsattr-defaults", srcs: ["lsattr.c"], - cflags: ["-W", "-Wall"], + cflags: ["-W", "-Wall", "-Wno-macro-redefined"], } lsattr_libs = [ @@ -169,7 +170,7 @@ cc_binary { name: "blkid", srcs: ["blkid.c"], - cflags: ["-W", "-Wall"], + cflags: ["-W", "-Wall", "-Wno-macro-redefined"], shared_libs: [ "libext2fs", "libext2_blkid", @@ -187,7 +188,7 @@ cc_binary { host_supported: true, srcs: ["e4crypt.c"], - cflags: ["-W", "-Wall"], + cflags: ["-W", "-Wall", "-Wno-macro-redefined"], shared_libs: [ "libext2fs", "libext2_uuid", @@ -209,7 +210,7 @@ cc_binary { host_supported: true, srcs: ["e2image.c"], - cflags: ["-W", "-Wall"], + cflags: ["-W", "-Wall", "-Wno-macro-redefined"], shared_libs: [ "libext2fs", "libext2_blkid", diff --git a/resize/Android.bp b/resize/Android.bp index 5d8f0e8..6d3d321 100644 --- a/resize/Android.bp +++ b/resize/Android.bp @@ -12,7 +12,7 @@ cc_binary { "sim_progress.c", "resource_track.c", ], - cflags: ["-W", "-Wall"], + cflags: ["-W", "-Wall", "-Wno-macro-redefined"], shared_libs: [ "libext2fs", "libext2_com_err",