Remove unused parameter warnings from include/ and src/core

pull/20632/head
Vijay Pai 6 years ago
parent 72475f48a0
commit 500b0e6d8e
  1. 4
      include/grpcpp/security/tls_credentials_options.h
  2. 8
      src/core/ext/filters/client_channel/service_config.h
  3. 40
      src/core/ext/transport/chttp2/transport/flow_control.h
  4. 2
      src/core/lib/gprpp/memory.h
  5. 2
      src/core/lib/iomgr/exec_ctx.h
  6. 2
      src/core/lib/iomgr/udp_server.h
  7. 2
      src/cpp/server/secure_server_credentials.cc

@ -125,7 +125,7 @@ struct TlsCredentialReloadInterface {
/** A callback that invokes the credential reload. **/ /** A callback that invokes the credential reload. **/
virtual int Schedule(TlsCredentialReloadArg* arg) = 0; virtual int Schedule(TlsCredentialReloadArg* arg) = 0;
/** A callback that cancels a credential reload request. **/ /** A callback that cancels a credential reload request. **/
virtual void Cancel(TlsCredentialReloadArg* arg) {} virtual void Cancel(TlsCredentialReloadArg* /* arg */) {}
}; };
/** TLS credential reloag config, wraps grpc_tls_credential_reload_config. It is /** TLS credential reloag config, wraps grpc_tls_credential_reload_config. It is
@ -227,7 +227,7 @@ struct TlsServerAuthorizationCheckInterface {
/** A callback that invokes the server authorization check. **/ /** A callback that invokes the server authorization check. **/
virtual int Schedule(TlsServerAuthorizationCheckArg* arg) = 0; virtual int Schedule(TlsServerAuthorizationCheckArg* arg) = 0;
/** A callback that cancels a server authorization check request. **/ /** A callback that cancels a server authorization check request. **/
virtual void Cancel(TlsServerAuthorizationCheckArg* arg) {} virtual void Cancel(TlsServerAuthorizationCheckArg* /* arg */) {}
}; };
/** TLS server authorization check config, wraps /** TLS server authorization check config, wraps

@ -69,14 +69,14 @@ class ServiceConfig : public RefCounted<ServiceConfig> {
public: public:
virtual ~Parser() = default; virtual ~Parser() = default;
virtual UniquePtr<ParsedConfig> ParseGlobalParams(const grpc_json* json, virtual UniquePtr<ParsedConfig> ParseGlobalParams(
grpc_error** error) { const grpc_json* /* json */, grpc_error** error) {
GPR_DEBUG_ASSERT(error != nullptr); GPR_DEBUG_ASSERT(error != nullptr);
return nullptr; return nullptr;
} }
virtual UniquePtr<ParsedConfig> ParsePerMethodParams(const grpc_json* json, virtual UniquePtr<ParsedConfig> ParsePerMethodParams(
grpc_error** error) { const grpc_json* /* json */, grpc_error** error) {
GPR_DEBUG_ASSERT(error != nullptr); GPR_DEBUG_ASSERT(error != nullptr);
return nullptr; return nullptr;
} }

@ -152,7 +152,7 @@ class TransportFlowControlBase {
virtual bool flow_control_enabled() const { abort(); } virtual bool flow_control_enabled() const { abort(); }
// Called to check if the transport needs to send a WINDOW_UPDATE frame // Called to check if the transport needs to send a WINDOW_UPDATE frame
virtual uint32_t MaybeSendUpdate(bool writing_anyway) { abort(); } virtual uint32_t MaybeSendUpdate(bool /* writing_anyway */) { abort(); }
// Using the protected members, returns and Action to be taken by the // Using the protected members, returns and Action to be taken by the
// tranport. // tranport.
@ -165,14 +165,14 @@ class TransportFlowControlBase {
// Called to do bookkeeping when a stream owned by this transport sends // Called to do bookkeeping when a stream owned by this transport sends
// data on the wire // data on the wire
virtual void StreamSentData(int64_t size) { abort(); } virtual void StreamSentData(int64_t /* size */) { abort(); }
// Called to do bookkeeping when a stream owned by this transport receives // Called to do bookkeeping when a stream owned by this transport receives
// data from the wire. Also does error checking for frame size. // data from the wire. Also does error checking for frame size.
virtual grpc_error* RecvData(int64_t incoming_frame_size) { abort(); } virtual grpc_error* RecvData(int64_t /* incoming_frame_size */) { abort(); }
// Called to do bookkeeping when we receive a WINDOW_UPDATE frame. // Called to do bookkeeping when we receive a WINDOW_UPDATE frame.
virtual void RecvUpdate(uint32_t size) { abort(); } virtual void RecvUpdate(uint32_t /* size */) { abort(); }
// Returns the BdpEstimator held by this object. Caller is responsible for // Returns the BdpEstimator held by this object. Caller is responsible for
// checking for nullptr. TODO(ncteisen): consider fully encapsulating all // checking for nullptr. TODO(ncteisen): consider fully encapsulating all
@ -207,14 +207,14 @@ class TransportFlowControlDisabled final : public TransportFlowControlBase {
bool flow_control_enabled() const override { return false; } bool flow_control_enabled() const override { return false; }
// Never do anything. // Never do anything.
uint32_t MaybeSendUpdate(bool writing_anyway) override { return 0; } uint32_t MaybeSendUpdate(bool /* writing_anyway */) override { return 0; }
FlowControlAction MakeAction() override { return FlowControlAction(); } FlowControlAction MakeAction() override { return FlowControlAction(); }
FlowControlAction PeriodicUpdate() override { return FlowControlAction(); } FlowControlAction PeriodicUpdate() override { return FlowControlAction(); }
void StreamSentData(int64_t size) override {} void StreamSentData(int64_t /* size */) override {}
grpc_error* RecvData(int64_t incoming_frame_size) override { grpc_error* RecvData(int64_t /* incoming_frame_size */) override {
return GRPC_ERROR_NONE; return GRPC_ERROR_NONE;
} }
void RecvUpdate(uint32_t size) override {} void RecvUpdate(uint32_t /* size */) override {}
}; };
// Implementation of flow control that abides to HTTP/2 spec and attempts // Implementation of flow control that abides to HTTP/2 spec and attempts
@ -347,29 +347,31 @@ class StreamFlowControlBase {
virtual ~StreamFlowControlBase() {} virtual ~StreamFlowControlBase() {}
// Updates an action using the protected members. // Updates an action using the protected members.
virtual FlowControlAction UpdateAction(FlowControlAction action) { abort(); } virtual FlowControlAction UpdateAction(FlowControlAction /* action */) {
abort();
}
// Using the protected members, returns an Action for this stream to be // Using the protected members, returns an Action for this stream to be
// taken by the tranport. // taken by the tranport.
virtual FlowControlAction MakeAction() { abort(); } virtual FlowControlAction MakeAction() { abort(); }
// Bookkeeping for when data is sent on this stream. // Bookkeeping for when data is sent on this stream.
virtual void SentData(int64_t outgoing_frame_size) { abort(); } virtual void SentData(int64_t /* outgoing_frame_size */) { abort(); }
// Bookkeeping and error checking for when data is received by this stream. // Bookkeeping and error checking for when data is received by this stream.
virtual grpc_error* RecvData(int64_t incoming_frame_size) { abort(); } virtual grpc_error* RecvData(int64_t /* incoming_frame_size */) { abort(); }
// Called to check if this stream needs to send a WINDOW_UPDATE frame. // Called to check if this stream needs to send a WINDOW_UPDATE frame.
virtual uint32_t MaybeSendUpdate() { abort(); } virtual uint32_t MaybeSendUpdate() { abort(); }
// Bookkeeping for receiving a WINDOW_UPDATE from for this stream. // Bookkeeping for receiving a WINDOW_UPDATE from for this stream.
virtual void RecvUpdate(uint32_t size) { abort(); } virtual void RecvUpdate(uint32_t /* size */) { abort(); }
// Bookkeeping for when a call pulls bytes out of the transport. At this // Bookkeeping for when a call pulls bytes out of the transport. At this
// point we consider the data 'used' and can thus let out peer know we are // point we consider the data 'used' and can thus let out peer know we are
// ready for more data. // ready for more data.
virtual void IncomingByteStreamUpdate(size_t max_size_hint, virtual void IncomingByteStreamUpdate(size_t /* max_size_hint */,
size_t have_already) { size_t /* have_already */) {
abort(); abort();
} }
@ -399,14 +401,14 @@ class StreamFlowControlDisabled : public StreamFlowControlBase {
return action; return action;
} }
FlowControlAction MakeAction() override { return FlowControlAction(); } FlowControlAction MakeAction() override { return FlowControlAction(); }
void SentData(int64_t outgoing_frame_size) override {} void SentData(int64_t /* outgoing_frame_size */) override {}
grpc_error* RecvData(int64_t incoming_frame_size) override { grpc_error* RecvData(int64_t /* incoming_frame_size */) override {
return GRPC_ERROR_NONE; return GRPC_ERROR_NONE;
} }
uint32_t MaybeSendUpdate() override { return 0; } uint32_t MaybeSendUpdate() override { return 0; }
void RecvUpdate(uint32_t size) override {} void RecvUpdate(uint32_t /* size */) override {}
void IncomingByteStreamUpdate(size_t max_size_hint, void IncomingByteStreamUpdate(size_t /* max_size_hint */,
size_t have_already) override {} size_t /* have_already */) override {}
}; };
// Implementation of flow control that abides to HTTP/2 spec and attempts // Implementation of flow control that abides to HTTP/2 spec and attempts

@ -110,7 +110,7 @@ class Allocator {
std::allocator<void>::const_pointer hint = nullptr) { std::allocator<void>::const_pointer hint = nullptr) {
return static_cast<pointer>(gpr_malloc(n * sizeof(T))); return static_cast<pointer>(gpr_malloc(n * sizeof(T)));
} }
void deallocate(T* p, std::size_t n) { gpr_free(p); } void deallocate(T* p, std::size_t /* n */) { gpr_free(p); }
size_t max_size() const { size_t max_size() const {
return std::numeric_limits<size_type>::max() / sizeof(value_type); return std::numeric_limits<size_type>::max() / sizeof(value_type);
} }

@ -225,7 +225,7 @@ class ExecCtx {
virtual bool CheckReadyToFinish() { return false; } virtual bool CheckReadyToFinish() { return false; }
/** Disallow delete on ExecCtx. */ /** Disallow delete on ExecCtx. */
static void operator delete(void* p) { abort(); } static void operator delete(void* /* p */) { abort(); }
private: private:
/** Set exec_ctx_ to exec_ctx. */ /** Set exec_ctx_ to exec_ctx. */

@ -38,7 +38,7 @@ typedef struct grpc_udp_server grpc_udp_server;
* Its implementation should do the real IO work, e.g. read packet and write. */ * Its implementation should do the real IO work, e.g. read packet and write. */
class GrpcUdpHandler { class GrpcUdpHandler {
public: public:
GrpcUdpHandler(grpc_fd* emfd, void* user_data) {} GrpcUdpHandler(grpc_fd* /* emfd */, void* /* user_data */) {}
virtual ~GrpcUdpHandler() {} virtual ~GrpcUdpHandler() {}
// Interfaces to be implemented by subclasses to do the actual setup/tear down // Interfaces to be implemented by subclasses to do the actual setup/tear down

@ -134,7 +134,7 @@ std::shared_ptr<ServerCredentials> SslServerCredentials(
namespace experimental { namespace experimental {
std::shared_ptr<ServerCredentials> AltsServerCredentials( std::shared_ptr<ServerCredentials> AltsServerCredentials(
const AltsServerCredentialsOptions& options) { const AltsServerCredentialsOptions& /* options */) {
grpc_alts_credentials_options* c_options = grpc_alts_credentials_options* c_options =
grpc_alts_credentials_server_options_create(); grpc_alts_credentials_server_options_create();
grpc_server_credentials* c_creds = grpc_server_credentials* c_creds =

Loading…
Cancel
Save