diff options
author | Chih-Hung Hsieh <chh@google.com> | 2017-09-28 13:39:39 -0700 |
---|---|---|
committer | Chih-Hung Hsieh <chh@google.com> | 2017-09-28 13:47:03 -0700 |
commit | e39c5304fcf65f80d6f0dd1cff0a4b16aa919f1d (patch) | |
tree | 429dca7225740419aa57e8eeed6045d4a3d68a8a | |
parent | d05a95e0607023d576ee17f3e7a2952174e33d34 (diff) | |
download | libcap-e39c5304fcf65f80d6f0dd1cff0a4b16aa919f1d.tar.gz |
Use -Werror in external/libcapandroid-o-mr1-preview-1
* Share all warning flags in libcap_defaults.
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: Ibafe6f474dc18293158b8d368ba41396a4e442ac
-rw-r--r-- | Android.bp | 27 |
1 files changed, 14 insertions, 13 deletions
@@ -12,6 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. +cc_defaults { + name: "libcap_defaults", + cflags: [ + "-Wall", + "-Werror", + "-Wno-unused-parameter", + "-Wno-unused-result", + "-Wno-tautological-compare", + ], +} + cc_library { name: "libcap", host_supported: true, @@ -19,11 +30,7 @@ cc_library { vndk: { enabled: true, }, - - cflags: [ - "-Wno-unused-parameter", - "-Wno-tautological-compare", - ], + defaults: ["libcap_defaults"], srcs: [ "libcap/cap_alloc.c", @@ -52,10 +59,7 @@ cc_binary { srcs: ["progs/getcap.c"], - cflags: [ - "-Wno-unused-parameter", - "-Wno-tautological-compare", - ], + defaults: ["libcap_defaults"], static_libs: [ "libcap", @@ -67,10 +71,7 @@ cc_binary { srcs: ["progs/setcap.c"], - cflags: [ - "-Wno-unused-parameter", - "-Wno-tautological-compare", - ], + defaults: ["libcap_defaults"], static_libs: [ "libcap", |