Merge "Add -Wall and -Werror to Android.bp." into main am: 2cc21727b9 Original change: https://android-review.googlesource.com/c/platform/system/gsid/+/3507314 Change-Id: Id97c31ea9329f955ff2f77dfd8f6bacfef6c4076 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/Android.bp b/Android.bp index ecc4e30..83247cc 100644 --- a/Android.bp +++ b/Android.bp
@@ -35,6 +35,10 @@ srcs: [ "gsi_tool.cpp", ], + cflags: [ + "-Wall", + "-Werror", + ], } cc_library { @@ -49,6 +53,10 @@ shared_libs: [ "libbase", ], + cflags: [ + "-Wall", + "-Werror", + ], export_include_dirs: ["include"], } @@ -63,6 +71,10 @@ "libbinder", "libutils", ], + cflags: [ + "-Wall", + "-Werror", + ], export_include_dirs: ["include"], } @@ -110,6 +122,10 @@ header_libs: [ "libstorage_literals_headers", ], + cflags: [ + "-Wall", + "-Werror", + ], target: { android: { shared_libs: [
diff --git a/gsi_service.h b/gsi_service.h index 0dce269..9883b8b 100644 --- a/gsi_service.h +++ b/gsi_service.h
@@ -108,8 +108,6 @@ bool SetBootMode(bool one_shot); - static android::wp<GsiService> sInstance; - std::string install_dir_ = {}; std::unique_ptr<PartitionInstaller> installer_; std::mutex lock_;
diff --git a/gsi_tool.cpp b/gsi_tool.cpp index 6aa0fb5..6f78163 100644 --- a/gsi_tool.cpp +++ b/gsi_tool.cpp
@@ -237,13 +237,11 @@ {"no-reboot", no_argument, nullptr, 'n'}, {"userdata-size", required_argument, nullptr, 'u'}, {"partition-name", required_argument, nullptr, 'p'}, - {"wipe", no_argument, nullptr, 'w'}, {nullptr, 0, nullptr, 0}, }; int64_t gsiSize = 0; int64_t userdataSize = 0; - bool wipeUserdata = false; bool reboot = true; std::string installDir = ""; std::string partition = kDefaultPartition; @@ -273,9 +271,6 @@ case 'i': installDir = optarg; break; - case 'w': - wipeUserdata = true; - break; case 'n': reboot = false; break;