]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
AOSP: Android: consolidate warning suppressions
authorEric Biggers <ebiggers@google.com>
Mon, 30 Jan 2023 19:04:33 +0000 (19:04 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 1 Feb 2023 05:27:32 +0000 (00:27 -0500)
For warnings not supported by upstream e2fsprogs, it's a waste of time
to suppress them only in specific places, as they can show up anywhere
in future releases of e2fsprogs.  Let's consolidate all these warning
suppressions into the top-level Android.bp for e2fsprogs.

Change-Id: Icebc03289dae920cb1b673e605c48f7f2b517625
From AOSP commit: d08d59557a34c6362e3660e7e35bc118591dbbfa

Android.bp
e2fsck/Android.bp
lib/blkid/Android.bp
lib/e2p/Android.bp
lib/ext2fs/Android.bp
lib/uuid/Android.bp
misc/Android.bp

index ae1452097e67da3888b5ddb4f07d788a603c0bdc..38b9bef3e1153690e6f6a4a3393d13c4dfaa3fd7 100644 (file)
@@ -42,14 +42,20 @@ license {
 
 cc_defaults {
     name: "e2fsprogs-defaults",
-    cflags: ["-Wall", "-Werror", "-Wno-pointer-arith"],
+    cflags: [
+        "-Wall",
+        "-Werror",
+        // Some warnings that Android's build system enables by default are not
+        // supported by upstream e2fsprogs.  When such a warning shows up,
+        // disable it below.  Please don't disable warnings that upstream
+        // e2fsprogs is supposed to support; for those, fix the code instead.
+        "-Wno-pointer-arith",
+        "-Wno-sign-compare",
+        "-Wno-type-limits",
+        "-Wno-typedef-redefinition",
+        "-Wno-unused-parameter",
+    ],
     target: {
-        windows: {
-            cflags: [
-                "-Wno-typedef-redefinition",
-                "-Wno-unused-parameter",
-            ],
-        },
         bionic: {
             system_shared_libs: ["libc", "libdl"],
         },
index ad2e4354a803169b08f58753d5a51b0f754929a7..b42de9d74b131e87f52b2422c7d604e701de0fef 100644 (file)
@@ -47,9 +47,6 @@ cc_defaults {
         "extents.c",
         "encrypted_files.c",
     ],
-    cflags: [
-        "-Wno-sign-compare",
-    ],
 }
 
 e2fsck_libs = [
index cf205163ae322f24bf5950cb9c4d557524865ae6..891c74a3ac13940f43d0d03b25f086a2395f96d8 100644 (file)
@@ -39,18 +39,10 @@ cc_library {
 
     target: {
         windows: {
-            cflags: [
-                "-Wno-error=typedef-redefinition",
-            ],
-
             enabled: true,
         },
     },
 
-    cflags: [
-        "-Wno-unused-parameter",
-    ],
-
     header_libs: ["libext2-headers"],
     export_include_dirs: ["."],
     export_header_lib_headers: ["libext2-headers"],
index 6cfdcda70f550df944799d1eb9ae6bf7cee63b3d..bed92c120c191f1b0c759f214696b412dc6f0361 100644 (file)
@@ -46,16 +46,9 @@ cc_library {
         "percent.c",
     ],
 
-    cflags: [
-        "-Wno-unused-parameter",
-    ],
-
     target: {
         windows: {
             enabled: true,
-            cflags: [
-                "-Wno-error=typedef-redefinition",
-            ],
         },
     },
 
index 5ed7aec1e8601b093c5dbd2a93d1a82e42fe75a2..db8b3b7e74aa8de689be921ead6eea15a0c65af6 100644 (file)
@@ -112,7 +112,6 @@ cc_library {
         "libsparse",
         "libz",
     ],
-    cflags: ["-Wno-unused-parameter"],
     target: {
         android: {
             shared_libs: ["libext2_uuid"],
@@ -121,9 +120,6 @@ cc_library {
             enabled: true,
             srcs: ["windows_io.c"],
             exclude_srcs: ["unix_io.c"],
-            cflags: [
-                "-Wno-error=typedef-redefinition",
-            ],
         },
     },
 
index 596b20a8bbaab22344306adde24262c18bee8aed..f8f07603e7980690b40a42b424d0af6c555b357d 100644 (file)
@@ -39,9 +39,6 @@ cc_library {
         "unparse.c",
         "uuid_time.c",
     ],
-    cflags: [
-        "-Wno-unused-parameter",
-    ],
     target: {
         windows: {
             enabled: true
index 70c2041652801f31dc944cfbba2cd11ea168472b..083ae689c3c6428ac6395e3858879123c438d183 100644 (file)
@@ -51,10 +51,6 @@ cc_defaults {
         "mk_hugefiles.c",
         "default_profile.c",
     ],
-    cflags: [
-        "-Wno-error=type-limits",
-    ],
-
     stl: "libc++_static",
     include_dirs: ["external/e2fsprogs/e2fsck"],
 }