summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorChih-Hung Hsieh2017-10-02 17:20:07 -0500
committerChih-Hung Hsieh2017-11-01 13:32:55 -0500
commit122352d983805b8ded5f8f3c07e75844244aba40 (patch)
tree2512a37968404bd39265da943bee33e33e064744 /base
parent15251c24b9cbb809aad74d8e5796f0eb6d83d8bb (diff)
downloadplatform-system-core-122352d983805b8ded5f8f3c07e75844244aba40.tar.gz
platform-system-core-122352d983805b8ded5f8f3c07e75844244aba40.tar.xz
platform-system-core-122352d983805b8ded5f8f3c07e75844244aba40.zip
Use -Werror in system/core
* Move -Wall -Werror from cppflags to cflags. * Fix/suppress warning on unused variables. Bug: 66996870 Test: build with WITH_TIDY=1 Change-Id: I1e05e96a1d0bcb2ccef1ce456504b3af57167cc5
Diffstat (limited to 'base')
-rw-r--r--base/Android.bp13
1 files changed, 6 insertions, 7 deletions
diff --git a/base/Android.bp b/base/Android.bp
index f4a841107..7ff02a0ee 100644
--- a/base/Android.bp
+++ b/base/Android.bp
@@ -14,11 +14,10 @@
14// limitations under the License. 14// limitations under the License.
15// 15//
16 16
17libbase_cppflags = [ 17cc_defaults {
18 "-Wall", 18 name: "libbase_defaults",
19 "-Wextra", 19 cflags: ["-Wall", "-Werror", "-Wextra"],
20 "-Werror", 20}
21]
22 21
23cc_library_headers { 22cc_library_headers {
24 name: "libbase_headers", 23 name: "libbase_headers",
@@ -38,6 +37,7 @@ cc_library_headers {
38 37
39cc_library { 38cc_library {
40 name: "libbase", 39 name: "libbase",
40 defaults: ["libbase_defaults"],
41 vendor_available: true, 41 vendor_available: true,
42 host_supported: true, 42 host_supported: true,
43 vndk: { 43 vndk: {
@@ -59,7 +59,6 @@ cc_library {
59 ], 59 ],
60 export_header_lib_headers: ["libbase_headers"], 60 export_header_lib_headers: ["libbase_headers"],
61 61
62 cppflags: libbase_cppflags,
63 shared_libs: ["liblog"], 62 shared_libs: ["liblog"],
64 target: { 63 target: {
65 android: { 64 android: {
@@ -102,6 +101,7 @@ cc_library {
102// ------------------------------------------------------------------------------ 101// ------------------------------------------------------------------------------
103cc_test { 102cc_test {
104 name: "libbase_test", 103 name: "libbase_test",
104 defaults: ["libbase_defaults"],
105 host_supported: true, 105 host_supported: true,
106 srcs: [ 106 srcs: [
107 "endian_test.cpp", 107 "endian_test.cpp",
@@ -133,7 +133,6 @@ cc_test {
133 }, 133 },
134 }, 134 },
135 local_include_dirs: ["."], 135 local_include_dirs: ["."],
136 cppflags: libbase_cppflags,
137 shared_libs: ["libbase"], 136 shared_libs: ["libbase"],
138 compile_multilib: "both", 137 compile_multilib: "both",
139 multilib: { 138 multilib: {