From d1acbbc4a6b9dc45fa786324d20ff1a4c9b19a86 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Thu, 5 Oct 2017 13:38:28 -0700 Subject: Use -Werror in frameworks/native/libs/binder Bug: 66996870 Test: build with WITH_TIDY=1 Change-Id: I1c9ef44f6f1aaaae187ba3ca777331748b05d43d --- libs/binder/tests/Android.bp | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'libs/binder') diff --git a/libs/binder/tests/Android.bp b/libs/binder/tests/Android.bp index 3071408540..c451780dd7 100644 --- a/libs/binder/tests/Android.bp +++ b/libs/binder/tests/Android.bp @@ -14,9 +14,20 @@ // limitations under the License. // +cc_defaults { + name: "binder_test_defaults", + cflags: [ + "-Wall", + "-Werror", + "-Wno-unused-private-field", + "-Wno-unused-variable", + ], +} + cc_test { name: "binderDriverInterfaceTest_IPC_32", srcs: ["binderDriverInterfaceTest.cpp"], + defaults: ["binder_test_defaults"], compile_multilib: "32", cflags: ["-DBINDER_IPC_32BIT=1"], } @@ -30,11 +41,13 @@ cc_test { name: "binderDriverInterfaceTest", srcs: ["binderDriverInterfaceTest.cpp"], + defaults: ["binder_test_defaults"], } cc_test { name: "binderValueTypeTest", srcs: ["binderValueTypeTest.cpp"], + defaults: ["binder_test_defaults"], shared_libs: [ "libbinder", "libutils", @@ -44,6 +57,7 @@ cc_test { cc_test { name: "binderLibTest_IPC_32", srcs: ["binderLibTest.cpp"], + defaults: ["binder_test_defaults"], shared_libs: [ "libbinder", "libutils", @@ -59,6 +73,7 @@ cc_test { }, }, + defaults: ["binder_test_defaults"], name: "binderLibTest", srcs: ["binderLibTest.cpp"], shared_libs: [ @@ -70,6 +85,7 @@ cc_test { cc_test { name: "binderThroughputTest", srcs: ["binderThroughputTest.cpp"], + defaults: ["binder_test_defaults"], shared_libs: [ "libbinder", "libutils", @@ -77,8 +93,6 @@ cc_test { clang: true, cflags: [ "-g", - "-Wall", - "-Werror", "-Wno-missing-field-initializers", "-Wno-sign-compare", "-O3", @@ -88,6 +102,7 @@ cc_test { cc_test { name: "binderTextOutputTest", srcs: ["binderTextOutputTest.cpp"], + defaults: ["binder_test_defaults"], shared_libs: [ "libbinder", "libutils", @@ -98,6 +113,7 @@ cc_test { cc_test { name: "schd-dbg", srcs: ["schd-dbg.cpp"], + defaults: ["binder_test_defaults"], shared_libs: [ "libbinder", "libutils", @@ -108,9 +124,9 @@ cc_test { cc_test { name: "binderSafeInterfaceTest", srcs: ["binderSafeInterfaceTest.cpp"], + defaults: ["binder_test_defaults"], cppflags: [ - "-Werror", "-Weverything", "-Wno-c++98-compat", "-Wno-c++98-compat-pedantic", -- cgit v1.2.3