Merge pull request #20632 from vjpai/remove_some_warnings

Remove all unused parameter warnings from include/ and src/core
reviewable/pr18856/r14^2
Vijay Pai 5 years ago committed by GitHub
commit 84895f6f57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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. **/
virtual int Schedule(TlsCredentialReloadArg* arg) = 0;
/** 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
@ -227,7 +227,7 @@ struct TlsServerAuthorizationCheckInterface {
/** A callback that invokes the server authorization check. **/
virtual int Schedule(TlsServerAuthorizationCheckArg* arg) = 0;
/** 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

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

@ -152,7 +152,7 @@ class TransportFlowControlBase {
virtual bool flow_control_enabled() const { abort(); }
// 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
// tranport.
@ -165,14 +165,14 @@ class TransportFlowControlBase {
// Called to do bookkeeping when a stream owned by this transport sends
// 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
// 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.
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
// 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; }
// 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 PeriodicUpdate() override { return FlowControlAction(); }
void StreamSentData(int64_t size) override {}
grpc_error* RecvData(int64_t incoming_frame_size) override {
void StreamSentData(int64_t /* size */) override {}
grpc_error* RecvData(int64_t /* incoming_frame_size */) override {
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
@ -347,29 +347,31 @@ class StreamFlowControlBase {
virtual ~StreamFlowControlBase() {}
// 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
// taken by the tranport.
virtual FlowControlAction MakeAction() { abort(); }
// 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.
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.
virtual uint32_t MaybeSendUpdate() { abort(); }
// 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
// point we consider the data 'used' and can thus let out peer know we are
// ready for more data.
virtual void IncomingByteStreamUpdate(size_t max_size_hint,
size_t have_already) {
virtual void IncomingByteStreamUpdate(size_t /* max_size_hint */,
size_t /* have_already */) {
abort();
}
@ -399,14 +401,14 @@ class StreamFlowControlDisabled : public StreamFlowControlBase {
return action;
}
FlowControlAction MakeAction() override { return FlowControlAction(); }
void SentData(int64_t outgoing_frame_size) override {}
grpc_error* RecvData(int64_t incoming_frame_size) override {
void SentData(int64_t /* outgoing_frame_size */) override {}
grpc_error* RecvData(int64_t /* incoming_frame_size */) override {
return GRPC_ERROR_NONE;
}
uint32_t MaybeSendUpdate() override { return 0; }
void RecvUpdate(uint32_t size) override {}
void IncomingByteStreamUpdate(size_t max_size_hint,
size_t have_already) override {}
void RecvUpdate(uint32_t /* size */) override {}
void IncomingByteStreamUpdate(size_t /* max_size_hint */,
size_t /* have_already */) override {}
};
// 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) {
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 {
return std::numeric_limits<size_type>::max() / sizeof(value_type);
}

@ -225,7 +225,7 @@ class ExecCtx {
virtual bool CheckReadyToFinish() { return false; }
/** Disallow delete on ExecCtx. */
static void operator delete(void* p) { abort(); }
static void operator delete(void* /* p */) { abort(); }
private:
/** 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. */
class GrpcUdpHandler {
public:
GrpcUdpHandler(grpc_fd* emfd, void* user_data) {}
GrpcUdpHandler(grpc_fd* /* emfd */, void* /* user_data */) {}
virtual ~GrpcUdpHandler() {}
// Interfaces to be implemented by subclasses to do the actual setup/tear down

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

Loading…
Cancel
Save