From 548fdbda19d327e2285e43bf72c136938dbe6817 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Tue, 5 Dec 2017 10:11:02 -0800 Subject: [PATCH] Use -Werror in frameworks/base/tools/streaming_proto * Remove unused constants. Bug: 66996870 Test: build with WITH_TIDY=1 Change-Id: I43940e8c446bab25b8fa841ec8c17885ab5d88ed --- tools/streaming_proto/Android.bp | 4 ++++ tools/streaming_proto/stream_proto_utils.cpp | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/streaming_proto/Android.bp b/tools/streaming_proto/Android.bp index dc5c14e32cbdf..4e9391db9a5b0 100644 --- a/tools/streaming_proto/Android.bp +++ b/tools/streaming_proto/Android.bp @@ -24,6 +24,10 @@ cc_defaults { "stream_proto_utils.cpp", "string_utils.cpp", ], + cflags: [ + "-Wall", + "-Werror", + ], shared_libs: ["libprotoc"], } diff --git a/tools/streaming_proto/stream_proto_utils.cpp b/tools/streaming_proto/stream_proto_utils.cpp index e8f86bc0be83f..fb2d98d45b0e8 100644 --- a/tools/streaming_proto/stream_proto_utils.cpp +++ b/tools/streaming_proto/stream_proto_utils.cpp @@ -13,8 +13,6 @@ const uint64_t FIELD_TYPE_SHIFT = 32; // TODO: packed is not supported yet. // const uint64_t FIELD_COUNT_SHIFT = 40; -const uint64_t FIELD_COUNT_MASK = 0x0fULL << FIELD_COUNT_SHIFT; -const uint64_t FIELD_COUNT_UNKNOWN = 0; const uint64_t FIELD_COUNT_SINGLE = 1ULL << FIELD_COUNT_SHIFT; const uint64_t FIELD_COUNT_REPEATED = 2ULL << FIELD_COUNT_SHIFT; const uint64_t FIELD_COUNT_PACKED = 5ULL << FIELD_COUNT_SHIFT;