diff --git a/include/grpcpp/security/tls_credentials_options.h b/include/grpcpp/security/tls_credentials_options.h index 76ff9ed2939..3e9b037ec25 100644 --- a/include/grpcpp/security/tls_credentials_options.h +++ b/include/grpcpp/security/tls_credentials_options.h @@ -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 diff --git a/src/core/ext/filters/client_channel/service_config.h b/src/core/ext/filters/client_channel/service_config.h index f0206bf782e..9c13917e620 100644 --- a/src/core/ext/filters/client_channel/service_config.h +++ b/src/core/ext/filters/client_channel/service_config.h @@ -69,14 +69,14 @@ class ServiceConfig : public RefCounted { public: virtual ~Parser() = default; - virtual UniquePtr ParseGlobalParams(const grpc_json* json, - grpc_error** error) { + virtual UniquePtr ParseGlobalParams( + const grpc_json* /* json */, grpc_error** error) { GPR_DEBUG_ASSERT(error != nullptr); return nullptr; } - virtual UniquePtr ParsePerMethodParams(const grpc_json* json, - grpc_error** error) { + virtual UniquePtr ParsePerMethodParams( + const grpc_json* /* json */, grpc_error** error) { GPR_DEBUG_ASSERT(error != nullptr); return nullptr; } diff --git a/src/core/ext/transport/chttp2/transport/flow_control.h b/src/core/ext/transport/chttp2/transport/flow_control.h index 39ce1c51ec9..76ef7a29530 100644 --- a/src/core/ext/transport/chttp2/transport/flow_control.h +++ b/src/core/ext/transport/chttp2/transport/flow_control.h @@ -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 diff --git a/src/core/lib/gprpp/memory.h b/src/core/lib/gprpp/memory.h index 68717dd019d..f0c6bb14658 100644 --- a/src/core/lib/gprpp/memory.h +++ b/src/core/lib/gprpp/memory.h @@ -110,7 +110,7 @@ class Allocator { std::allocator::const_pointer hint = nullptr) { return static_cast(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::max() / sizeof(value_type); } diff --git a/src/core/lib/iomgr/exec_ctx.h b/src/core/lib/iomgr/exec_ctx.h index 0ccf2a878bf..f1907396e14 100644 --- a/src/core/lib/iomgr/exec_ctx.h +++ b/src/core/lib/iomgr/exec_ctx.h @@ -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. */ diff --git a/src/core/lib/iomgr/udp_server.h b/src/core/lib/iomgr/udp_server.h index 759917ee4e4..e92f3b994bd 100644 --- a/src/core/lib/iomgr/udp_server.h +++ b/src/core/lib/iomgr/udp_server.h @@ -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 diff --git a/src/cpp/server/secure_server_credentials.cc b/src/cpp/server/secure_server_credentials.cc index 623fb2c03d0..81b99913000 100644 --- a/src/cpp/server/secure_server_credentials.cc +++ b/src/cpp/server/secure_server_credentials.cc @@ -131,7 +131,7 @@ std::shared_ptr SslServerCredentials( namespace experimental { std::shared_ptr AltsServerCredentials( - const AltsServerCredentialsOptions& options) { + const AltsServerCredentialsOptions& /* options */) { grpc_alts_credentials_options* c_options = grpc_alts_credentials_server_options_create(); grpc_server_credentials* c_creds =