diff options
author | Chih-Hung Hsieh <chh@google.com> | 2017-10-02 15:20:07 -0700 |
---|---|---|
committer | Chih-Hung Hsieh <chh@google.com> | 2017-11-01 11:32:55 -0700 |
commit | 122352d983805b8ded5f8f3c07e75844244aba40 (patch) | |
tree | 2512a37968404bd39265da943bee33e33e064744 /base | |
parent | 15251c24b9cbb809aad74d8e5796f0eb6d83d8bb (diff) | |
download | core-122352d983805b8ded5f8f3c07e75844244aba40.tar.gz core-122352d983805b8ded5f8f3c07e75844244aba40.tar.bz2 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.bp | 13 |
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 @@ // limitations under the License. // -libbase_cppflags = [ - "-Wall", - "-Wextra", - "-Werror", -] +cc_defaults { + name: "libbase_defaults", + cflags: ["-Wall", "-Werror", "-Wextra"], +} cc_library_headers { name: "libbase_headers", @@ -38,6 +37,7 @@ cc_library_headers { cc_library { name: "libbase", + defaults: ["libbase_defaults"], vendor_available: true, host_supported: true, vndk: { @@ -59,7 +59,6 @@ cc_library { ], export_header_lib_headers: ["libbase_headers"], - cppflags: libbase_cppflags, shared_libs: ["liblog"], target: { android: { @@ -102,6 +101,7 @@ cc_library { // ------------------------------------------------------------------------------ cc_test { name: "libbase_test", + defaults: ["libbase_defaults"], host_supported: true, srcs: [ "endian_test.cpp", @@ -133,7 +133,6 @@ cc_test { }, }, local_include_dirs: ["."], - cppflags: libbase_cppflags, shared_libs: ["libbase"], compile_multilib: "both", multilib: { |