From f99a08fe4647564bc7d379fdfa0ef90e7135c37e Mon Sep 17 00:00:00 2001 From: WANG Lei Date: Wed, 3 Mar 2021 09:51:36 +0800 Subject: [PATCH] Remove unused parameter from UnaryDeserializeHelper (#25332) * fix -Wunused-parameter warning * clang-fmt * clang-format Co-authored-by: Vijay Pai --- include/grpcpp/impl/codegen/byte_buffer.h | 5 ++--- include/grpcpp/impl/codegen/method_handler.h | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/grpcpp/impl/codegen/byte_buffer.h b/include/grpcpp/impl/codegen/byte_buffer.h index 4347745c2d7..2c015f2266f 100644 --- a/include/grpcpp/impl/codegen/byte_buffer.h +++ b/include/grpcpp/impl/codegen/byte_buffer.h @@ -41,8 +41,7 @@ class CallbackUnaryHandler; template class CallbackServerStreamingHandler; template -void* UnaryDeserializeHelper(grpc_call*, grpc_byte_buffer*, ::grpc::Status*, - RequestType*); +void* UnaryDeserializeHelper(grpc_byte_buffer*, ::grpc::Status*, RequestType*); template class ServerStreamingHandler; template <::grpc::StatusCode code> @@ -164,7 +163,7 @@ class ByteBuffer final { friend class internal::CallOpRecvMessage; friend class internal::CallOpGenericRecvMessage; template - friend void* internal::UnaryDeserializeHelper(grpc_call*, grpc_byte_buffer*, + friend void* internal::UnaryDeserializeHelper(grpc_byte_buffer*, ::grpc::Status*, RequestType*); template friend class internal::ServerStreamingHandler; diff --git a/include/grpcpp/impl/codegen/method_handler.h b/include/grpcpp/impl/codegen/method_handler.h index 963423df467..756f4aae751 100644 --- a/include/grpcpp/impl/codegen/method_handler.h +++ b/include/grpcpp/impl/codegen/method_handler.h @@ -77,8 +77,8 @@ void UnaryRunHandlerHelper(const MethodHandler::HandlerParameter& param, /// A helper function with reduced templating to do deserializing. template -void* UnaryDeserializeHelper(grpc_call* call, grpc_byte_buffer* req, - ::grpc::Status* status, RequestType* request) { +void* UnaryDeserializeHelper(grpc_byte_buffer* req, ::grpc::Status* status, + RequestType* request) { ::grpc::ByteBuffer buf; buf.set_buffer(req); *status = ::grpc::SerializationTraits::Deserialize( @@ -123,7 +123,7 @@ class RpcMethodHandler : public ::grpc::internal::MethodHandler { auto* request = new (::grpc::g_core_codegen_interface->grpc_call_arena_alloc( call, sizeof(RequestType))) RequestType; - return UnaryDeserializeHelper(call, req, status, + return UnaryDeserializeHelper(req, status, static_cast(request)); }