Remove unused parameter from UnaryDeserializeHelper (#25332)

* fix -Wunused-parameter warning

* clang-fmt

* clang-format

Co-authored-by: Vijay Pai <vpai@google.com>
reviewable/pr25395/r2
WANG Lei 4 years ago committed by GitHub
parent 2794beb89c
commit f99a08fe46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      include/grpcpp/impl/codegen/byte_buffer.h
  2. 6
      include/grpcpp/impl/codegen/method_handler.h

@ -41,8 +41,7 @@ class CallbackUnaryHandler;
template <class RequestType, class ResponseType>
class CallbackServerStreamingHandler;
template <class RequestType>
void* UnaryDeserializeHelper(grpc_call*, grpc_byte_buffer*, ::grpc::Status*,
RequestType*);
void* UnaryDeserializeHelper(grpc_byte_buffer*, ::grpc::Status*, RequestType*);
template <class ServiceType, class RequestType, class ResponseType>
class ServerStreamingHandler;
template <::grpc::StatusCode code>
@ -164,7 +163,7 @@ class ByteBuffer final {
friend class internal::CallOpRecvMessage;
friend class internal::CallOpGenericRecvMessage;
template <class RequestType>
friend void* internal::UnaryDeserializeHelper(grpc_call*, grpc_byte_buffer*,
friend void* internal::UnaryDeserializeHelper(grpc_byte_buffer*,
::grpc::Status*, RequestType*);
template <class ServiceType, class RequestType, class ResponseType>
friend class internal::ServerStreamingHandler;

@ -77,8 +77,8 @@ void UnaryRunHandlerHelper(const MethodHandler::HandlerParameter& param,
/// A helper function with reduced templating to do deserializing.
template <class RequestType>
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<RequestType>::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<BaseRequestType*>(request));
}

Loading…
Cancel
Save