From 69e99a827555ce69cb796589189dab4fc6a9375f Mon Sep 17 00:00:00 2001 From: ncteisen Date: Wed, 2 Jan 2019 14:24:30 -0800 Subject: [PATCH 1/2] Add clang fallthrough annotation --- test/core/memory_usage/server.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/test/core/memory_usage/server.cc b/test/core/memory_usage/server.cc index 7424797e6f5..c79d661a422 100644 --- a/test/core/memory_usage/server.cc +++ b/test/core/memory_usage/server.cc @@ -295,6 +295,7 @@ int main(int argc, char** argv) { /* fallthrough */ // no break here since we want to continue to case // FLING_SERVER_SEND_STATUS_SNAPSHOT to destroy the snapshot call + [[fallthrough]]; case FLING_SERVER_SEND_STATUS_SNAPSHOT: grpc_byte_buffer_destroy(payload_buffer); grpc_byte_buffer_destroy(terminal_buffer); From 3af464f29cb7701a432518a71b0615c47ba58077 Mon Sep 17 00:00:00 2001 From: ncteisen Date: Thu, 3 Jan 2019 08:19:51 -0800 Subject: [PATCH 2/2] return targets to library --- test/core/memory_usage/BUILD | 6 +++--- test/core/memory_usage/server.cc | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/test/core/memory_usage/BUILD b/test/core/memory_usage/BUILD index dd185e6577b..38b088c75c7 100644 --- a/test/core/memory_usage/BUILD +++ b/test/core/memory_usage/BUILD @@ -12,13 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_test", "grpc_package") +load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_package") grpc_package(name = "test/core/memory_usage") licenses(["notice"]) # Apache v2 -grpc_cc_binary( +grpc_cc_library( name = "memory_usage_client", testonly = 1, srcs = ["client.cc"], @@ -29,7 +29,7 @@ grpc_cc_binary( ], ) -grpc_cc_binary( +grpc_cc_library( name = "memory_usage_server", testonly = 1, srcs = ["server.cc"], diff --git a/test/core/memory_usage/server.cc b/test/core/memory_usage/server.cc index c79d661a422..7424797e6f5 100644 --- a/test/core/memory_usage/server.cc +++ b/test/core/memory_usage/server.cc @@ -295,7 +295,6 @@ int main(int argc, char** argv) { /* fallthrough */ // no break here since we want to continue to case // FLING_SERVER_SEND_STATUS_SNAPSHOT to destroy the snapshot call - [[fallthrough]]; case FLING_SERVER_SEND_STATUS_SNAPSHOT: grpc_byte_buffer_destroy(payload_buffer); grpc_byte_buffer_destroy(terminal_buffer);