Merge branch 'master' into combinernew

reviewable/pr20542/r3
Yash Tibrewal 6 years ago
commit 3edeee7ce9
  1. 3
      .gitmodules
  2. 2
      src/core/lib/iomgr/executor/threadpool.h
  3. 2
      src/cpp/client/secure_credentials.cc
  4. 16
      src/cpp/common/channel_filter.h
  5. 8
      src/cpp/common/tls_credentials_options_util.cc
  6. 10
      src/cpp/ext/proto_server_reflection.cc
  7. 4
      src/cpp/ext/proto_server_reflection_plugin.cc
  8. 17
      src/cpp/server/channelz/channelz_service.cc
  9. 5
      src/cpp/server/channelz/channelz_service_plugin.cc
  10. 4
      src/cpp/server/health/default_health_check_service.h
  11. 16
      src/cpp/server/server_cc.cc
  12. 2
      src/cpp/server/server_context.cc
  13. 10
      test/core/bad_client/bad_client.cc
  14. 2
      test/core/bad_client/tests/bad_streaming_id.cc
  15. 2
      test/core/bad_client/tests/badreq.cc
  16. 2
      test/core/bad_client/tests/connection_prefix.cc
  17. 2
      test/core/bad_client/tests/duplicate_header.cc
  18. 2
      test/core/bad_client/tests/headers.cc
  19. 2
      test/core/bad_client/tests/initial_settings_frame.cc
  20. 6
      test/core/bad_client/tests/large_metadata.cc
  21. 2
      test/core/bad_client/tests/out_of_bounds.cc
  22. 2
      test/core/bad_client/tests/server_registered_method.cc
  23. 4
      test/core/bad_client/tests/simple_request.cc
  24. 2
      test/core/bad_client/tests/unknown_frame.cc
  25. 2
      test/core/bad_client/tests/window_overflow.cc
  26. 2
      test/core/channel/channel_args_test.cc
  27. 20
      test/core/channel/channel_stack_builder_test.cc
  28. 17
      test/core/channel/channel_stack_test.cc
  29. 12
      test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc
  30. 10
      test/core/client_channel/resolvers/dns_resolver_cooldown_test.cc
  31. 4
      test/core/client_channel/resolvers/dns_resolver_test.cc
  32. 2
      test/core/client_channel/resolvers/fake_resolver_test.cc
  33. 2
      test/core/client_channel/resolvers/sockaddr_resolver_test.cc
  34. 4
      test/core/client_channel/service_config_test.cc
  35. 2
      test/core/compression/compression_test.cc
  36. 2
      test/core/compression/stream_compression_test.cc
  37. 6
      test/core/end2end/bad_server_response_test.cc
  38. 2
      test/core/end2end/dualstack_socket_test.cc
  39. 2
      test/core/end2end/fixtures/h2_census.cc
  40. 2
      test/core/end2end/fixtures/h2_compress.cc
  41. 7
      test/core/end2end/fixtures/h2_fakesec.cc
  42. 2
      test/core/end2end/fixtures/h2_fd.cc
  43. 2
      test/core/end2end/fixtures/h2_full+pipe.cc
  44. 2
      test/core/end2end/fixtures/h2_full+trace.cc
  45. 2
      test/core/end2end/fixtures/h2_full+workarounds.cc
  46. 2
      test/core/end2end/fixtures/h2_full.cc
  47. 2
      test/core/end2end/fixtures/h2_http_proxy.cc
  48. 2
      test/core/end2end/fixtures/h2_local_ipv4.cc
  49. 2
      test/core/end2end/fixtures/h2_local_ipv6.cc
  50. 2
      test/core/end2end/fixtures/h2_local_uds.cc
  51. 4
      test/core/end2end/fixtures/h2_oauth2.cc
  52. 2
      test/core/end2end/fixtures/h2_sockpair+trace.cc
  53. 2
      test/core/end2end/fixtures/h2_sockpair.cc
  54. 2
      test/core/end2end/fixtures/h2_sockpair_1byte.cc
  55. 11
      test/core/end2end/fixtures/h2_spiffe.cc
  56. 7
      test/core/end2end/fixtures/h2_ssl.cc
  57. 7
      test/core/end2end/fixtures/h2_ssl_cred_reload.cc
  58. 5
      test/core/end2end/fixtures/h2_ssl_proxy.cc
  59. 2
      test/core/end2end/fixtures/h2_uds.cc
  60. 2
      test/core/end2end/fixtures/inproc.cc
  61. 24
      test/core/end2end/fuzzers/api_fuzzer.cc
  62. 4
      test/core/end2end/fuzzers/client_fuzzer.cc
  63. 4
      test/core/end2end/fuzzers/server_fuzzer.cc
  64. 7
      test/core/end2end/h2_ssl_cert_test.cc
  65. 6
      test/core/end2end/inproc_callback_test.cc
  66. 2
      test/core/end2end/tests/cancel_test_helpers.h
  67. 2
      test/core/end2end/tests/channelz.cc
  68. 2
      test/core/end2end/tests/connectivity.cc
  69. 22
      test/core/end2end/tests/filter_call_init_fails.cc
  70. 19
      test/core/end2end/tests/filter_causes_close.cc
  71. 12
      test/core/end2end/tests/filter_context.cc
  72. 18
      test/core/end2end/tests/filter_latency.cc
  73. 10
      test/core/end2end/tests/filter_status_code.cc
  74. 2
      test/core/end2end/tests/no_error_on_hotpath.cc
  75. 2
      test/core/end2end/tests/no_logging.cc
  76. 4
      test/core/end2end/tests/stream_compression_compressed_payload.cc
  77. 2
      test/core/end2end/tests/stream_compression_payload.cc
  78. 2
      test/core/fling/fling_stream_test.cc
  79. 2
      test/core/fling/fling_test.cc
  80. 2
      test/core/fling/server.cc
  81. 6
      test/core/gpr/log_test.cc
  82. 2
      test/core/gpr/tls_test.cc
  83. 2
      test/core/gprpp/global_config_env_test.cc
  84. 2
      test/core/gprpp/thd_test.cc
  85. 4
      test/core/handshake/client_ssl.cc
  86. 10
      test/core/handshake/readahead_handshaker_server_ssl.cc
  87. 2
      test/core/handshake/server_ssl.cc
  88. 2
      test/core/handshake/verify_peer_options.cc
  89. 2
      test/core/http/httpcli_test.cc
  90. 2
      test/core/http/httpscli_test.cc
  91. 2
      test/core/iomgr/buffer_list_test.cc
  92. 8
      test/core/iomgr/combiner_test.cc
  93. 2
      test/core/iomgr/endpoint_pair_test.cc
  94. 2
      test/core/iomgr/ev_epollex_linux_test.cc
  95. 16
      test/core/iomgr/fd_posix_test.cc
  96. 2
      test/core/iomgr/resolve_address_posix_test.cc
  97. 4
      test/core/iomgr/resolve_address_test.cc
  98. 4
      test/core/iomgr/resource_quota_test.cc
  99. 6
      test/core/iomgr/tcp_client_posix_test.cc
  100. 4
      test/core/iomgr/tcp_posix_test.cc
  101. Some files were not shown because too many files have changed in this diff Show More

3
.gitmodules vendored

@ -43,9 +43,6 @@
[submodule "third_party/protoc-gen-validate"] [submodule "third_party/protoc-gen-validate"]
path = third_party/protoc-gen-validate path = third_party/protoc-gen-validate
url = https://github.com/envoyproxy/protoc-gen-validate.git url = https://github.com/envoyproxy/protoc-gen-validate.git
[submodule "third_party/upb"]
path = third_party/upb
url = https://github.com/protocolbuffers/upb.git
[submodule "third_party/udpa"] [submodule "third_party/udpa"]
path = third_party/udpa path = third_party/udpa
url = https://github.com/cncf/udpa.git url = https://github.com/cncf/udpa.git

@ -62,7 +62,7 @@ class ThreadPoolInterface {
// NULL closure. // NULL closure.
class ThreadPoolWorker { class ThreadPoolWorker {
public: public:
ThreadPoolWorker(const char* thd_name, ThreadPoolInterface* pool, ThreadPoolWorker(const char* thd_name, ThreadPoolInterface* /*pool*/,
MPMCQueueInterface* queue, Thread::Options& options, MPMCQueueInterface* queue, Thread::Options& options,
int index) int index)
: queue_(queue), thd_name_(thd_name), index_(index) { : queue_(queue), thd_name_(thd_name), index_(index) {

@ -382,7 +382,7 @@ std::shared_ptr<CallCredentials> MetadataCredentialsFromPlugin(
namespace grpc { namespace grpc {
namespace { namespace {
void DeleteWrapper(void* wrapper, grpc_error* ignored) { void DeleteWrapper(void* wrapper, grpc_error* /*ignored*/) {
MetadataCredentialsPluginWrapper* w = MetadataCredentialsPluginWrapper* w =
static_cast<MetadataCredentialsPluginWrapper*>(wrapper); static_cast<MetadataCredentialsPluginWrapper*>(wrapper);
delete w; delete w;

@ -236,13 +236,13 @@ class ChannelData {
// TODO(roth): Come up with a more C++-like API for the channel element. // TODO(roth): Come up with a more C++-like API for the channel element.
/// Initializes the channel data. /// Initializes the channel data.
virtual grpc_error* Init(grpc_channel_element* elem, virtual grpc_error* Init(grpc_channel_element* /*elem*/,
grpc_channel_element_args* args) { grpc_channel_element_args* /*args*/) {
return GRPC_ERROR_NONE; return GRPC_ERROR_NONE;
} }
// Called before destruction. // Called before destruction.
virtual void Destroy(grpc_channel_element* elem) {} virtual void Destroy(grpc_channel_element* /*elem*/) {}
virtual void StartTransportOp(grpc_channel_element* elem, TransportOp* op); virtual void StartTransportOp(grpc_channel_element* elem, TransportOp* op);
@ -259,15 +259,15 @@ class CallData {
// TODO(roth): Come up with a more C++-like API for the call element. // TODO(roth): Come up with a more C++-like API for the call element.
/// Initializes the call data. /// Initializes the call data.
virtual grpc_error* Init(grpc_call_element* elem, virtual grpc_error* Init(grpc_call_element* /*elem*/,
const grpc_call_element_args* args) { const grpc_call_element_args* /*args*/) {
return GRPC_ERROR_NONE; return GRPC_ERROR_NONE;
} }
// Called before destruction. // Called before destruction.
virtual void Destroy(grpc_call_element* elem, virtual void Destroy(grpc_call_element* /*elem*/,
const grpc_call_final_info* final_info, const grpc_call_final_info* /*final_info*/,
grpc_closure* then_call_closure) {} grpc_closure* /*then_call_closure*/) {}
/// Starts a new stream operation. /// Starts a new stream operation.
virtual void StartTransportStreamOpBatch(grpc_call_element* elem, virtual void StartTransportStreamOpBatch(grpc_call_element* elem,

@ -57,7 +57,7 @@ grpc_tls_key_materials_config* ConvertToCKeyMaterialsConfig(
/** The C schedule and cancel functions for the credential reload config. /** The C schedule and cancel functions for the credential reload config.
* They populate a C credential reload arg with the result of a C++ credential * They populate a C credential reload arg with the result of a C++ credential
* reload schedule/cancel API. **/ * reload schedule/cancel API. **/
int TlsCredentialReloadConfigCSchedule(void* config_user_data, int TlsCredentialReloadConfigCSchedule(void* /*config_user_data*/,
grpc_tls_credential_reload_arg* arg) { grpc_tls_credential_reload_arg* arg) {
if (arg == nullptr || arg->config == nullptr || if (arg == nullptr || arg->config == nullptr ||
arg->config->context() == nullptr) { arg->config->context() == nullptr) {
@ -71,7 +71,7 @@ int TlsCredentialReloadConfigCSchedule(void* config_user_data,
return schedule_result; return schedule_result;
} }
void TlsCredentialReloadConfigCCancel(void* config_user_data, void TlsCredentialReloadConfigCCancel(void* /*config_user_data*/,
grpc_tls_credential_reload_arg* arg) { grpc_tls_credential_reload_arg* arg) {
if (arg == nullptr || arg->config == nullptr || if (arg == nullptr || arg->config == nullptr ||
arg->config->context() == nullptr) { arg->config->context() == nullptr) {
@ -101,7 +101,7 @@ void TlsCredentialReloadArgDestroyContext(void* context) {
* config. They populate a C server authorization check arg with the result * config. They populate a C server authorization check arg with the result
* of a C++ server authorization check schedule/cancel API. **/ * of a C++ server authorization check schedule/cancel API. **/
int TlsServerAuthorizationCheckConfigCSchedule( int TlsServerAuthorizationCheckConfigCSchedule(
void* config_user_data, grpc_tls_server_authorization_check_arg* arg) { void* /*config_user_data*/, grpc_tls_server_authorization_check_arg* arg) {
if (arg == nullptr || arg->config == nullptr || if (arg == nullptr || arg->config == nullptr ||
arg->config->context() == nullptr) { arg->config->context() == nullptr) {
gpr_log(GPR_ERROR, gpr_log(GPR_ERROR,
@ -117,7 +117,7 @@ int TlsServerAuthorizationCheckConfigCSchedule(
} }
void TlsServerAuthorizationCheckConfigCCancel( void TlsServerAuthorizationCheckConfigCCancel(
void* config_user_data, grpc_tls_server_authorization_check_arg* arg) { void* /*config_user_data*/, grpc_tls_server_authorization_check_arg* arg) {
if (arg == nullptr || arg->config == nullptr || if (arg == nullptr || arg->config == nullptr ||
arg->config->context() == nullptr) { arg->config->context() == nullptr) {
gpr_log(GPR_ERROR, gpr_log(GPR_ERROR,

@ -97,7 +97,7 @@ void ProtoServerReflection::FillErrorResponse(const Status& status,
error_response->set_error_message(status.error_message()); error_response->set_error_message(status.error_message());
} }
Status ProtoServerReflection::ListService(ServerContext* context, Status ProtoServerReflection::ListService(ServerContext* /*context*/,
ListServiceResponse* response) { ListServiceResponse* response) {
if (services_ == nullptr) { if (services_ == nullptr) {
return Status(StatusCode::NOT_FOUND, "Services not found."); return Status(StatusCode::NOT_FOUND, "Services not found.");
@ -110,7 +110,7 @@ Status ProtoServerReflection::ListService(ServerContext* context,
} }
Status ProtoServerReflection::GetFileByName( Status ProtoServerReflection::GetFileByName(
ServerContext* context, const grpc::string& filename, ServerContext* /*context*/, const grpc::string& filename,
ServerReflectionResponse* response) { ServerReflectionResponse* response) {
if (descriptor_pool_ == nullptr) { if (descriptor_pool_ == nullptr) {
return Status::CANCELLED; return Status::CANCELLED;
@ -127,7 +127,7 @@ Status ProtoServerReflection::GetFileByName(
} }
Status ProtoServerReflection::GetFileContainingSymbol( Status ProtoServerReflection::GetFileContainingSymbol(
ServerContext* context, const grpc::string& symbol, ServerContext* /*context*/, const grpc::string& symbol,
ServerReflectionResponse* response) { ServerReflectionResponse* response) {
if (descriptor_pool_ == nullptr) { if (descriptor_pool_ == nullptr) {
return Status::CANCELLED; return Status::CANCELLED;
@ -144,7 +144,7 @@ Status ProtoServerReflection::GetFileContainingSymbol(
} }
Status ProtoServerReflection::GetFileContainingExtension( Status ProtoServerReflection::GetFileContainingExtension(
ServerContext* context, const ExtensionRequest* request, ServerContext* /*context*/, const ExtensionRequest* request,
ServerReflectionResponse* response) { ServerReflectionResponse* response) {
if (descriptor_pool_ == nullptr) { if (descriptor_pool_ == nullptr) {
return Status::CANCELLED; return Status::CANCELLED;
@ -168,7 +168,7 @@ Status ProtoServerReflection::GetFileContainingExtension(
} }
Status ProtoServerReflection::GetAllExtensionNumbers( Status ProtoServerReflection::GetAllExtensionNumbers(
ServerContext* context, const grpc::string& type, ServerContext* /*context*/, const grpc::string& type,
ExtensionNumberResponse* response) { ExtensionNumberResponse* response) {
if (descriptor_pool_ == nullptr) { if (descriptor_pool_ == nullptr) {
return Status::CANCELLED; return Status::CANCELLED;

@ -41,8 +41,8 @@ void ProtoServerReflectionPlugin::Finish(grpc::ServerInitializer* si) {
reflection_service_->SetServiceList(si->GetServiceList()); reflection_service_->SetServiceList(si->GetServiceList());
} }
void ProtoServerReflectionPlugin::ChangeArguments(const grpc::string& name, void ProtoServerReflectionPlugin::ChangeArguments(const grpc::string& /*name*/,
void* value) {} void* /*value*/) {}
bool ProtoServerReflectionPlugin::has_sync_methods() const { bool ProtoServerReflectionPlugin::has_sync_methods() const {
if (reflection_service_) { if (reflection_service_) {

@ -32,7 +32,8 @@ grpc::protobuf::util::Status ParseJson(const char* json_str,
} }
Status ChannelzService::GetTopChannels( Status ChannelzService::GetTopChannels(
ServerContext* unused, const channelz::v1::GetTopChannelsRequest* request, ServerContext* /*unused*/,
const channelz::v1::GetTopChannelsRequest* request,
channelz::v1::GetTopChannelsResponse* response) { channelz::v1::GetTopChannelsResponse* response) {
char* json_str = grpc_channelz_get_top_channels(request->start_channel_id()); char* json_str = grpc_channelz_get_top_channels(request->start_channel_id());
if (json_str == nullptr) { if (json_str == nullptr) {
@ -48,7 +49,7 @@ Status ChannelzService::GetTopChannels(
} }
Status ChannelzService::GetServers( Status ChannelzService::GetServers(
ServerContext* unused, const channelz::v1::GetServersRequest* request, ServerContext* /*unused*/, const channelz::v1::GetServersRequest* request,
channelz::v1::GetServersResponse* response) { channelz::v1::GetServersResponse* response) {
char* json_str = grpc_channelz_get_servers(request->start_server_id()); char* json_str = grpc_channelz_get_servers(request->start_server_id());
if (json_str == nullptr) { if (json_str == nullptr) {
@ -63,7 +64,7 @@ Status ChannelzService::GetServers(
return Status::OK; return Status::OK;
} }
Status ChannelzService::GetServer(ServerContext* unused, Status ChannelzService::GetServer(ServerContext* /*unused*/,
const channelz::v1::GetServerRequest* request, const channelz::v1::GetServerRequest* request,
channelz::v1::GetServerResponse* response) { channelz::v1::GetServerResponse* response) {
char* json_str = grpc_channelz_get_server(request->server_id()); char* json_str = grpc_channelz_get_server(request->server_id());
@ -80,7 +81,8 @@ Status ChannelzService::GetServer(ServerContext* unused,
} }
Status ChannelzService::GetServerSockets( Status ChannelzService::GetServerSockets(
ServerContext* unused, const channelz::v1::GetServerSocketsRequest* request, ServerContext* /*unused*/,
const channelz::v1::GetServerSocketsRequest* request,
channelz::v1::GetServerSocketsResponse* response) { channelz::v1::GetServerSocketsResponse* response) {
char* json_str = grpc_channelz_get_server_sockets( char* json_str = grpc_channelz_get_server_sockets(
request->server_id(), request->start_socket_id(), request->max_results()); request->server_id(), request->start_socket_id(), request->max_results());
@ -97,7 +99,7 @@ Status ChannelzService::GetServerSockets(
} }
Status ChannelzService::GetChannel( Status ChannelzService::GetChannel(
ServerContext* unused, const channelz::v1::GetChannelRequest* request, ServerContext* /*unused*/, const channelz::v1::GetChannelRequest* request,
channelz::v1::GetChannelResponse* response) { channelz::v1::GetChannelResponse* response) {
char* json_str = grpc_channelz_get_channel(request->channel_id()); char* json_str = grpc_channelz_get_channel(request->channel_id());
if (json_str == nullptr) { if (json_str == nullptr) {
@ -112,7 +114,8 @@ Status ChannelzService::GetChannel(
} }
Status ChannelzService::GetSubchannel( Status ChannelzService::GetSubchannel(
ServerContext* unused, const channelz::v1::GetSubchannelRequest* request, ServerContext* /*unused*/,
const channelz::v1::GetSubchannelRequest* request,
channelz::v1::GetSubchannelResponse* response) { channelz::v1::GetSubchannelResponse* response) {
char* json_str = grpc_channelz_get_subchannel(request->subchannel_id()); char* json_str = grpc_channelz_get_subchannel(request->subchannel_id());
if (json_str == nullptr) { if (json_str == nullptr) {
@ -127,7 +130,7 @@ Status ChannelzService::GetSubchannel(
return Status::OK; return Status::OK;
} }
Status ChannelzService::GetSocket(ServerContext* unused, Status ChannelzService::GetSocket(ServerContext* /*unused*/,
const channelz::v1::GetSocketRequest* request, const channelz::v1::GetSocketRequest* request,
channelz::v1::GetSocketResponse* response) { channelz::v1::GetSocketResponse* response) {
char* json_str = grpc_channelz_get_socket(request->socket_id()); char* json_str = grpc_channelz_get_socket(request->socket_id());

@ -39,9 +39,10 @@ class ChannelzServicePlugin : public ::grpc::ServerBuilderPlugin {
si->RegisterService(channelz_service_); si->RegisterService(channelz_service_);
} }
void Finish(grpc::ServerInitializer* si) override {} void Finish(grpc::ServerInitializer* /*si*/) override {}
void ChangeArguments(const grpc::string& name, void* value) override {} void ChangeArguments(const grpc::string& /*name*/, void* /*value*/) override {
}
bool has_sync_methods() const override { bool has_sync_methods() const override {
if (channelz_service_) { if (channelz_service_) {

@ -120,8 +120,8 @@ class DefaultHealthCheckService final : public HealthCheckServiceInterface {
HealthCheckServiceImpl* service); HealthCheckServiceImpl* service);
// Not used for Check. // Not used for Check.
void SendHealth(std::shared_ptr<CallHandler> self, void SendHealth(std::shared_ptr<CallHandler> /*self*/,
ServingStatus status) override {} ServingStatus /*status*/) override {}
private: private:
// Called when we receive a call. // Called when we receive a call.

@ -75,8 +75,8 @@ namespace {
class DefaultGlobalCallbacks final : public Server::GlobalCallbacks { class DefaultGlobalCallbacks final : public Server::GlobalCallbacks {
public: public:
~DefaultGlobalCallbacks() override {} ~DefaultGlobalCallbacks() override {}
void PreSynchronousRequest(ServerContext* context) override {} void PreSynchronousRequest(ServerContext* /*context*/) override {}
void PostSynchronousRequest(ServerContext* context) override {} void PostSynchronousRequest(ServerContext* /*context*/) override {}
}; };
std::shared_ptr<Server::GlobalCallbacks> g_callbacks = nullptr; std::shared_ptr<Server::GlobalCallbacks> g_callbacks = nullptr;
@ -90,12 +90,12 @@ void InitGlobalCallbacks() {
class ShutdownTag : public internal::CompletionQueueTag { class ShutdownTag : public internal::CompletionQueueTag {
public: public:
bool FinalizeResult(void** tag, bool* status) { return false; } bool FinalizeResult(void** /*tag*/, bool* /*status*/) { return false; }
}; };
class DummyTag : public internal::CompletionQueueTag { class DummyTag : public internal::CompletionQueueTag {
public: public:
bool FinalizeResult(void** tag, bool* status) { return true; } bool FinalizeResult(void** /*tag*/, bool* /*status*/) { return true; }
}; };
class UnimplementedAsyncRequestContext { class UnimplementedAsyncRequestContext {
@ -187,7 +187,7 @@ void ServerInterface::BaseAsyncRequest::
grpc_cq_begin_op(notification_cq_->cq(), this); grpc_cq_begin_op(notification_cq_->cq(), this);
grpc_cq_end_op( grpc_cq_end_op(
notification_cq_->cq(), this, GRPC_ERROR_NONE, notification_cq_->cq(), this, GRPC_ERROR_NONE,
[](void* arg, grpc_cq_completion* completion) { delete completion; }, [](void* /*arg*/, grpc_cq_completion* completion) { delete completion; },
nullptr, new grpc_cq_completion()); nullptr, new grpc_cq_completion());
} }
@ -395,7 +395,7 @@ class Server::SyncRequest final : public grpc::internal::CompletionQueueTag {
} }
} }
bool FinalizeResult(void** tag, bool* status) override { bool FinalizeResult(void** /*tag*/, bool* status) override {
if (!*status) { if (!*status) {
grpc_completion_queue_destroy(cq_); grpc_completion_queue_destroy(cq_);
cq_ = nullptr; cq_ = nullptr;
@ -785,13 +785,13 @@ class Server::CallbackRequest final : public Server::CallbackRequestBase {
template <> template <>
bool Server::CallbackRequest<grpc::ServerContext>::FinalizeResult( bool Server::CallbackRequest<grpc::ServerContext>::FinalizeResult(
void** tag, bool* status) { void** /*tag*/, bool* /*status*/) {
return false; return false;
} }
template <> template <>
bool Server::CallbackRequest<grpc::GenericServerContext>::FinalizeResult( bool Server::CallbackRequest<grpc::GenericServerContext>::FinalizeResult(
void** tag, bool* status) { void** /*tag*/, bool* status) {
if (*status) { if (*status) {
// TODO(yangg) remove the copy here // TODO(yangg) remove the copy here
ctx_.method_ = grpc::StringFromCopiedSlice(call_details_->method); ctx_.method_ = grpc::StringFromCopiedSlice(call_details_->method);

@ -73,7 +73,7 @@ class ServerContext::CompletionOp final
// This should always be arena allocated in the call, so override delete. // This should always be arena allocated in the call, so override delete.
// But this class is not trivially destructible, so must actually call delete // But this class is not trivially destructible, so must actually call delete
// before allowing the arena to be freed // before allowing the arena to be freed
static void operator delete(void* ptr, std::size_t size) { static void operator delete(void* /*ptr*/, std::size_t size) {
assert(size == sizeof(CompletionOp)); assert(size == sizeof(CompletionOp));
} }

@ -57,7 +57,7 @@ static void thd_func(void* arg) {
} }
/* Sets the done_write event */ /* Sets the done_write event */
static void set_done_write(void* arg, grpc_error* error) { static void set_done_write(void* arg, grpc_error* /*error*/) {
gpr_event* done_write = static_cast<gpr_event*>(arg); gpr_event* done_write = static_cast<gpr_event*>(arg);
gpr_event_set(done_write, (void*)1); gpr_event_set(done_write, (void*)1);
} }
@ -70,7 +70,7 @@ static void server_setup_transport(void* ts, grpc_transport* transport) {
} }
/* Sets the read_done event */ /* Sets the read_done event */
static void set_read_done(void* arg, grpc_error* error) { static void set_read_done(void* arg, grpc_error* /*error*/) {
gpr_event* read_done = static_cast<gpr_event*>(arg); gpr_event* read_done = static_cast<gpr_event*>(arg);
gpr_event_set(read_done, (void*)1); gpr_event_set(read_done, (void*)1);
} }
@ -252,7 +252,7 @@ void grpc_run_bad_client_test(
} }
bool client_connection_preface_validator(grpc_slice_buffer* incoming, bool client_connection_preface_validator(grpc_slice_buffer* incoming,
void* arg) { void* /*arg*/) {
if (incoming->count < 1) { if (incoming->count < 1) {
return false; return false;
} }
@ -278,7 +278,7 @@ grpc_bad_client_arg connection_preface_arg = {
client_connection_preface_validator, nullptr, client_connection_preface_validator, nullptr,
CONNECTION_PREFACE_FROM_CLIENT, sizeof(CONNECTION_PREFACE_FROM_CLIENT) - 1}; CONNECTION_PREFACE_FROM_CLIENT, sizeof(CONNECTION_PREFACE_FROM_CLIENT) - 1};
bool rst_stream_client_validator(grpc_slice_buffer* incoming, void* arg) { bool rst_stream_client_validator(grpc_slice_buffer* incoming, void* /*arg*/) {
// Get last frame from incoming slice buffer. // Get last frame from incoming slice buffer.
grpc_slice_buffer last_frame_buffer; grpc_slice_buffer last_frame_buffer;
grpc_slice_buffer_init(&last_frame_buffer); grpc_slice_buffer_init(&last_frame_buffer);
@ -311,7 +311,7 @@ static void* tag(intptr_t t) { return (void*)t; }
void server_verifier_request_call(grpc_server* server, void server_verifier_request_call(grpc_server* server,
grpc_completion_queue* cq, grpc_completion_queue* cq,
void* registered_method) { void* /*registered_method*/) {
grpc_call_error error; grpc_call_error error;
grpc_call* s; grpc_call* s;
grpc_call_details call_details; grpc_call_details call_details;

@ -75,7 +75,7 @@
namespace { namespace {
void verifier(grpc_server* server, grpc_completion_queue* cq, void verifier(grpc_server* server, grpc_completion_queue* cq,
void* registered_method) { void* /*registered_method*/) {
while (grpc_server_has_open_connections(server)) { while (grpc_server_has_open_connections(server)) {
GPR_ASSERT(grpc_completion_queue_next( GPR_ASSERT(grpc_completion_queue_next(
cq, grpc_timeout_milliseconds_to_deadline(20), nullptr) cq, grpc_timeout_milliseconds_to_deadline(20), nullptr)

@ -30,7 +30,7 @@
"\x00\x00\x00\x04\x00\x00\x00\x00\x00" /* settings frame */ "\x00\x00\x00\x04\x00\x00\x00\x00\x00" /* settings frame */
static void verifier(grpc_server* server, grpc_completion_queue* cq, static void verifier(grpc_server* server, grpc_completion_queue* cq,
void* registered_method) { void* /*registered_method*/) {
while (grpc_server_has_open_connections(server)) { while (grpc_server_has_open_connections(server)) {
GPR_ASSERT(grpc_completion_queue_next( GPR_ASSERT(grpc_completion_queue_next(
cq, grpc_timeout_milliseconds_to_deadline(20), nullptr) cq, grpc_timeout_milliseconds_to_deadline(20), nullptr)

@ -20,7 +20,7 @@
#include "test/core/bad_client/bad_client.h" #include "test/core/bad_client/bad_client.h"
static void verifier(grpc_server* server, grpc_completion_queue* cq, static void verifier(grpc_server* server, grpc_completion_queue* cq,
void* registered_method) { void* /*registered_method*/) {
while (grpc_server_has_open_connections(server)) { while (grpc_server_has_open_connections(server)) {
GPR_ASSERT(grpc_completion_queue_next( GPR_ASSERT(grpc_completion_queue_next(
cq, grpc_timeout_milliseconds_to_deadline(20), nullptr) cq, grpc_timeout_milliseconds_to_deadline(20), nullptr)

@ -52,7 +52,7 @@
static void* tag(intptr_t t) { return (void*)t; } static void* tag(intptr_t t) { return (void*)t; }
static void verifier(grpc_server* server, grpc_completion_queue* cq, static void verifier(grpc_server* server, grpc_completion_queue* cq,
void* registered_method) { void* /*registered_method*/) {
grpc_call_error error; grpc_call_error error;
grpc_call* s; grpc_call* s;
grpc_call_details call_details; grpc_call_details call_details;

@ -24,7 +24,7 @@
"\x00\x00\x00\x04\x00\x00\x00\x00\x00" "\x00\x00\x00\x04\x00\x00\x00\x00\x00"
static void verifier(grpc_server* server, grpc_completion_queue* cq, static void verifier(grpc_server* server, grpc_completion_queue* cq,
void* registered_method) { void* /*registered_method*/) {
while (grpc_server_has_open_connections(server)) { while (grpc_server_has_open_connections(server)) {
GPR_ASSERT(grpc_completion_queue_next( GPR_ASSERT(grpc_completion_queue_next(
cq, grpc_timeout_milliseconds_to_deadline(20), nullptr) cq, grpc_timeout_milliseconds_to_deadline(20), nullptr)

@ -23,7 +23,7 @@
#define ONE_SETTING_HDR "\x00\x00\x06\x04\x00\x00\x00\x00\x00" #define ONE_SETTING_HDR "\x00\x00\x06\x04\x00\x00\x00\x00\x00"
static void verifier(grpc_server* server, grpc_completion_queue* cq, static void verifier(grpc_server* server, grpc_completion_queue* cq,
void* registered_method) { void* /*registered_method*/) {
while (grpc_server_has_open_connections(server)) { while (grpc_server_has_open_connections(server)) {
GPR_ASSERT(grpc_completion_queue_next( GPR_ASSERT(grpc_completion_queue_next(
cq, grpc_timeout_milliseconds_to_deadline(20), nullptr) cq, grpc_timeout_milliseconds_to_deadline(20), nullptr)

@ -92,9 +92,9 @@
static void* tag(intptr_t t) { return (void*)t; } static void* tag(intptr_t t) { return (void*)t; }
static void server_verifier_sends_too_much_metadata(grpc_server* server, static void server_verifier_sends_too_much_metadata(
grpc_completion_queue* cq, grpc_server* server, grpc_completion_queue* cq,
void* registered_method) { void* /*registered_method*/) {
grpc_call_error error; grpc_call_error error;
grpc_call* s; grpc_call* s;
grpc_call_details call_details; grpc_call_details call_details;

@ -30,7 +30,7 @@
namespace { namespace {
void verifier(grpc_server* server, grpc_completion_queue* cq, void verifier(grpc_server* server, grpc_completion_queue* cq,
void* registered_method) { void* /*registered_method*/) {
while (grpc_server_has_open_connections(server)) { while (grpc_server_has_open_connections(server)) {
GPR_ASSERT(grpc_completion_queue_next( GPR_ASSERT(grpc_completion_queue_next(
cq, grpc_timeout_milliseconds_to_deadline(20), nullptr) cq, grpc_timeout_milliseconds_to_deadline(20), nullptr)

@ -67,7 +67,7 @@ static void verifier_succeeds(grpc_server* server, grpc_completion_queue* cq,
} }
static void verifier_fails(grpc_server* server, grpc_completion_queue* cq, static void verifier_fails(grpc_server* server, grpc_completion_queue* cq,
void* registered_method) { void* /*registered_method*/) {
while (grpc_server_has_open_connections(server)) { while (grpc_server_has_open_connections(server)) {
GPR_ASSERT(grpc_completion_queue_next( GPR_ASSERT(grpc_completion_queue_next(
cq, grpc_timeout_milliseconds_to_deadline(20), nullptr) cq, grpc_timeout_milliseconds_to_deadline(20), nullptr)

@ -88,7 +88,7 @@
static void* tag(intptr_t t) { return (void*)t; } static void* tag(intptr_t t) { return (void*)t; }
static void verifier(grpc_server* server, grpc_completion_queue* cq, static void verifier(grpc_server* server, grpc_completion_queue* cq,
void* registered_method) { void* /*registered_method*/) {
grpc_call_error error; grpc_call_error error;
grpc_call* s; grpc_call* s;
grpc_call_details call_details; grpc_call_details call_details;
@ -114,7 +114,7 @@ static void verifier(grpc_server* server, grpc_completion_queue* cq,
} }
static void failure_verifier(grpc_server* server, grpc_completion_queue* cq, static void failure_verifier(grpc_server* server, grpc_completion_queue* cq,
void* registered_method) { void* /*registered_method*/) {
while (grpc_server_has_open_connections(server)) { while (grpc_server_has_open_connections(server)) {
GPR_ASSERT(grpc_completion_queue_next( GPR_ASSERT(grpc_completion_queue_next(
cq, grpc_timeout_milliseconds_to_deadline(20), nullptr) cq, grpc_timeout_milliseconds_to_deadline(20), nullptr)

@ -25,7 +25,7 @@
#include "test/core/bad_client/bad_client.h" #include "test/core/bad_client/bad_client.h"
static void verifier(grpc_server* server, grpc_completion_queue* cq, static void verifier(grpc_server* server, grpc_completion_queue* cq,
void* registered_method) { void* /*registered_method*/) {
while (grpc_server_has_open_connections(server)) { while (grpc_server_has_open_connections(server)) {
GPR_ASSERT(grpc_completion_queue_next( GPR_ASSERT(grpc_completion_queue_next(
cq, grpc_timeout_milliseconds_to_deadline(20), nullptr) cq, grpc_timeout_milliseconds_to_deadline(20), nullptr)

@ -43,7 +43,7 @@
"\x10\x0auser-agent\"bad-client grpc-c/0.12.0.0 (linux)" "\x10\x0auser-agent\"bad-client grpc-c/0.12.0.0 (linux)"
static void verifier(grpc_server* server, grpc_completion_queue* cq, static void verifier(grpc_server* server, grpc_completion_queue* cq,
void* registered_method) { void* /*registered_method*/) {
while (grpc_server_has_open_connections(server)) { while (grpc_server_has_open_connections(server)) {
GPR_ASSERT(grpc_completion_queue_next( GPR_ASSERT(grpc_completion_queue_next(
cq, grpc_timeout_milliseconds_to_deadline(20), nullptr) cq, grpc_timeout_milliseconds_to_deadline(20), nullptr)

@ -100,7 +100,7 @@ static void test_channel_create_with_args(void) {
grpc_channel_args* mutate_channel_args(const char* target, grpc_channel_args* mutate_channel_args(const char* target,
grpc_channel_args* old_args, grpc_channel_args* old_args,
grpc_channel_stack_type type) { grpc_channel_stack_type /*type*/) {
GPR_ASSERT(old_args != nullptr); GPR_ASSERT(old_args != nullptr);
GPR_ASSERT(grpc_channel_args_find(old_args, "arg_int")->value.integer == 0); GPR_ASSERT(grpc_channel_args_find(old_args, "arg_int")->value.integer == 0);
GPR_ASSERT(strcmp(grpc_channel_args_find(old_args, "arg_str")->value.string, GPR_ASSERT(strcmp(grpc_channel_args_find(old_args, "arg_str")->value.string,

@ -29,26 +29,26 @@
#include "src/core/lib/surface/channel_init.h" #include "src/core/lib/surface/channel_init.h"
#include "test/core/util/test_config.h" #include "test/core/util/test_config.h"
static grpc_error* channel_init_func(grpc_channel_element* elem, static grpc_error* channel_init_func(grpc_channel_element* /*elem*/,
grpc_channel_element_args* args) { grpc_channel_element_args* /*args*/) {
return GRPC_ERROR_NONE; return GRPC_ERROR_NONE;
} }
static grpc_error* call_init_func(grpc_call_element* elem, static grpc_error* call_init_func(grpc_call_element* /*elem*/,
const grpc_call_element_args* args) { const grpc_call_element_args* /*args*/) {
return GRPC_ERROR_NONE; return GRPC_ERROR_NONE;
} }
static void channel_destroy_func(grpc_channel_element* elem) {} static void channel_destroy_func(grpc_channel_element* /*elem*/) {}
static void call_destroy_func(grpc_call_element* elem, static void call_destroy_func(grpc_call_element* /*elem*/,
const grpc_call_final_info* final_info, const grpc_call_final_info* /*final_info*/,
grpc_closure* ignored) {} grpc_closure* /*ignored*/) {}
bool g_replacement_fn_called = false; bool g_replacement_fn_called = false;
bool g_original_fn_called = false; bool g_original_fn_called = false;
void set_arg_once_fn(grpc_channel_stack* channel_stack, void set_arg_once_fn(grpc_channel_stack* /*channel_stack*/,
grpc_channel_element* elem, void* arg) { grpc_channel_element* /*elem*/, void* arg) {
bool* called = static_cast<bool*>(arg); bool* called = static_cast<bool*>(arg);
// Make sure this function is only called once per arg. // Make sure this function is only called once per arg.
GPR_ASSERT(*called == false); GPR_ASSERT(*called == false);

@ -40,35 +40,36 @@ static grpc_error* channel_init_func(grpc_channel_element* elem,
} }
static grpc_error* call_init_func(grpc_call_element* elem, static grpc_error* call_init_func(grpc_call_element* elem,
const grpc_call_element_args* args) { const grpc_call_element_args* /*args*/) {
++*static_cast<int*>(elem->channel_data); ++*static_cast<int*>(elem->channel_data);
*static_cast<int*>(elem->call_data) = 0; *static_cast<int*>(elem->call_data) = 0;
return GRPC_ERROR_NONE; return GRPC_ERROR_NONE;
} }
static void channel_destroy_func(grpc_channel_element* elem) {} static void channel_destroy_func(grpc_channel_element* /*elem*/) {}
static void call_destroy_func(grpc_call_element* elem, static void call_destroy_func(grpc_call_element* elem,
const grpc_call_final_info* final_info, const grpc_call_final_info* /*final_info*/,
grpc_closure* ignored) { grpc_closure* /*ignored*/) {
++*static_cast<int*>(elem->channel_data); ++*static_cast<int*>(elem->channel_data);
} }
static void call_func(grpc_call_element* elem, static void call_func(grpc_call_element* elem,
grpc_transport_stream_op_batch* op) { grpc_transport_stream_op_batch* /*op*/) {
++*static_cast<int*>(elem->call_data); ++*static_cast<int*>(elem->call_data);
} }
static void channel_func(grpc_channel_element* elem, grpc_transport_op* op) { static void channel_func(grpc_channel_element* elem,
grpc_transport_op* /*op*/) {
++*static_cast<int*>(elem->channel_data); ++*static_cast<int*>(elem->channel_data);
} }
static void free_channel(void* arg, grpc_error* error) { static void free_channel(void* arg, grpc_error* /*error*/) {
grpc_channel_stack_destroy(static_cast<grpc_channel_stack*>(arg)); grpc_channel_stack_destroy(static_cast<grpc_channel_stack*>(arg));
gpr_free(arg); gpr_free(arg);
} }
static void free_call(void* arg, grpc_error* error) { static void free_call(void* arg, grpc_error* /*error*/) {
grpc_call_stack_destroy(static_cast<grpc_call_stack*>(arg), nullptr, nullptr); grpc_call_stack_destroy(static_cast<grpc_call_stack*>(arg), nullptr, nullptr);
gpr_free(arg); gpr_free(arg);
} }

@ -35,8 +35,8 @@ static gpr_mu g_mu;
static bool g_fail_resolution = true; static bool g_fail_resolution = true;
static grpc_core::Combiner* g_combiner; static grpc_core::Combiner* g_combiner;
static void my_resolve_address(const char* addr, const char* default_port, static void my_resolve_address(const char* addr, const char* /*default_port*/,
grpc_pollset_set* interested_parties, grpc_pollset_set* /*interested_parties*/,
grpc_closure* on_done, grpc_closure* on_done,
grpc_resolved_addresses** addrs) { grpc_resolved_addresses** addrs) {
gpr_mu_lock(&g_mu); gpr_mu_lock(&g_mu);
@ -61,11 +61,11 @@ static grpc_address_resolver_vtable test_resolver = {my_resolve_address,
nullptr}; nullptr};
static grpc_ares_request* my_dns_lookup_ares_locked( static grpc_ares_request* my_dns_lookup_ares_locked(
const char* dns_server, const char* addr, const char* default_port, const char* /*dns_server*/, const char* addr, const char* /*default_port*/,
grpc_pollset_set* interested_parties, grpc_closure* on_done, grpc_pollset_set* /*interested_parties*/, grpc_closure* on_done,
grpc_core::UniquePtr<grpc_core::ServerAddressList>* addresses, grpc_core::UniquePtr<grpc_core::ServerAddressList>* addresses,
bool check_grpclb, char** service_config_json, int query_timeout_ms, bool /*check_grpclb*/, char** /*service_config_json*/,
grpc_core::Combiner* combiner) { int /*query_timeout_ms*/, grpc_core::Combiner* /*combiner*/) {
gpr_mu_lock(&g_mu); gpr_mu_lock(&g_mu);
GPR_ASSERT(0 == strcmp("test", addr)); GPR_ASSERT(0 == strcmp("test", addr));
grpc_error* error = GRPC_ERROR_NONE; grpc_error* error = GRPC_ERROR_NONE;

@ -62,7 +62,7 @@ static struct iomgr_args {
// times we incur in a system-level name resolution. // times we incur in a system-level name resolution.
static void test_resolve_address_impl(const char* name, static void test_resolve_address_impl(const char* name,
const char* default_port, const char* default_port,
grpc_pollset_set* interested_parties, grpc_pollset_set* /*interested_parties*/,
grpc_closure* on_done, grpc_closure* on_done,
grpc_resolved_addresses** addrs) { grpc_resolved_addresses** addrs) {
default_resolve_address->resolve_address( default_resolve_address->resolve_address(
@ -92,7 +92,7 @@ static grpc_address_resolver_vtable test_resolver = {
static grpc_ares_request* test_dns_lookup_ares_locked( static grpc_ares_request* test_dns_lookup_ares_locked(
const char* dns_server, const char* name, const char* default_port, const char* dns_server, const char* name, const char* default_port,
grpc_pollset_set* interested_parties, grpc_closure* on_done, grpc_pollset_set* /*interested_parties*/, grpc_closure* on_done,
grpc_core::UniquePtr<grpc_core::ServerAddressList>* addresses, grpc_core::UniquePtr<grpc_core::ServerAddressList>* addresses,
bool check_grpclb, char** service_config_json, int query_timeout_ms, bool check_grpclb, char** service_config_json, int query_timeout_ms,
grpc_core::Combiner* combiner) { grpc_core::Combiner* combiner) {
@ -121,7 +121,7 @@ static gpr_timespec test_deadline(void) {
return grpc_timeout_seconds_to_deadline(100); return grpc_timeout_seconds_to_deadline(100);
} }
static void do_nothing(void* arg, grpc_error* error) {} static void do_nothing(void* /*arg*/, grpc_error* /*error*/) {}
static void iomgr_args_init(iomgr_args* args) { static void iomgr_args_init(iomgr_args* args) {
gpr_event_init(&args->ev); gpr_event_init(&args->ev);
@ -187,7 +187,7 @@ class ResultHandler : public grpc_core::Resolver::ResultHandler {
state_ = state; state_ = state;
} }
void ReturnResult(grpc_core::Resolver::Result result) override { void ReturnResult(grpc_core::Resolver::Result /*result*/) override {
GPR_ASSERT(result_cb_ != nullptr); GPR_ASSERT(result_cb_ != nullptr);
GPR_ASSERT(state_ != nullptr); GPR_ASSERT(state_ != nullptr);
ResultCallback cb = result_cb_; ResultCallback cb = result_cb_;
@ -271,7 +271,7 @@ static void on_first_resolution(OnResolutionCallbackArg* cb_arg) {
gpr_mu_unlock(g_iomgr_args.mu); gpr_mu_unlock(g_iomgr_args.mu);
} }
static void start_test_under_combiner(void* arg, grpc_error* error) { static void start_test_under_combiner(void* arg, grpc_error* /*error*/) {
OnResolutionCallbackArg* res_cb_arg = OnResolutionCallbackArg* res_cb_arg =
static_cast<OnResolutionCallbackArg*>(arg); static_cast<OnResolutionCallbackArg*>(arg);
res_cb_arg->result_handler = grpc_core::New<ResultHandler>(); res_cb_arg->result_handler = grpc_core::New<ResultHandler>();

@ -31,8 +31,8 @@
static grpc_core::Combiner* g_combiner; static grpc_core::Combiner* g_combiner;
class TestResultHandler : public grpc_core::Resolver::ResultHandler { class TestResultHandler : public grpc_core::Resolver::ResultHandler {
void ReturnResult(grpc_core::Resolver::Result result) override {} void ReturnResult(grpc_core::Resolver::Result /*result*/) override {}
void ReturnError(grpc_error* error) override {} void ReturnError(grpc_error* /*error*/) override {}
}; };
static void test_succeeds(grpc_core::ResolverFactory* factory, static void test_succeeds(grpc_core::ResolverFactory* factory,

@ -55,7 +55,7 @@ class ResultHandler : public grpc_core::Resolver::ResultHandler {
ev_ = nullptr; ev_ = nullptr;
} }
void ReturnError(grpc_error* error) override {} void ReturnError(grpc_error* /*error*/) override {}
private: private:
grpc_core::Resolver::Result expected_; grpc_core::Resolver::Result expected_;

@ -32,7 +32,7 @@ static grpc_core::Combiner* g_combiner;
class ResultHandler : public grpc_core::Resolver::ResultHandler { class ResultHandler : public grpc_core::Resolver::ResultHandler {
public: public:
void ReturnResult(grpc_core::Resolver::Result result) override {} void ReturnResult(grpc_core::Resolver::Result /*result*/) override {}
void ReturnError(grpc_error* error) override { GRPC_ERROR_UNREF(error); } void ReturnError(grpc_error* error) override { GRPC_ERROR_UNREF(error); }
}; };

@ -116,14 +116,14 @@ class TestParser2 : public ServiceConfig::Parser {
class ErrorParser : public ServiceConfig::Parser { class ErrorParser : public ServiceConfig::Parser {
public: public:
UniquePtr<ServiceConfig::ParsedConfig> ParsePerMethodParams( UniquePtr<ServiceConfig::ParsedConfig> ParsePerMethodParams(
const grpc_json* json, grpc_error** error) override { const grpc_json* /*json*/, grpc_error** error) override {
GPR_DEBUG_ASSERT(error != nullptr); GPR_DEBUG_ASSERT(error != nullptr);
*error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(MethodError()); *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(MethodError());
return nullptr; return nullptr;
} }
UniquePtr<ServiceConfig::ParsedConfig> ParseGlobalParams( UniquePtr<ServiceConfig::ParsedConfig> ParseGlobalParams(
const grpc_json* json, grpc_error** error) override { const grpc_json* /*json*/, grpc_error** error) override {
GPR_DEBUG_ASSERT(error != nullptr); GPR_DEBUG_ASSERT(error != nullptr);
*error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(GlobalError()); *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(GlobalError());
return nullptr; return nullptr;

@ -335,7 +335,7 @@ static void test_channel_args_compression_algorithm_states(void) {
grpc_channel_args_destroy(ch_args); grpc_channel_args_destroy(ch_args);
} }
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
grpc_init(); grpc_init();
test_compression_algorithm_parse(); test_compression_algorithm_parse();
test_compression_algorithm_name(); test_compression_algorithm_name();

@ -287,7 +287,7 @@ static void test_stream_compression_sync_flush() {
grpc_slice_buffer_destroy(&sink); grpc_slice_buffer_destroy(&sink);
} }
int main(int argc, char** argv) { int main(int /*argc*/, char** /*argv*/) {
grpc_init(); grpc_init();
test_stream_compression_simple_compress_decompress(); test_stream_compression_simple_compress_decompress();
test_stream_compression_simple_compress_decompress_with_output_size_constraint(); test_stream_compression_simple_compress_decompress_with_output_size_constraint();

@ -92,7 +92,7 @@ static grpc_closure on_write;
static void* tag(intptr_t t) { return (void*)t; } static void* tag(intptr_t t) { return (void*)t; }
static void done_write(void* arg, grpc_error* error) { static void done_write(void* /*arg*/, grpc_error* error) {
GPR_ASSERT(error == GRPC_ERROR_NONE); GPR_ASSERT(error == GRPC_ERROR_NONE);
gpr_atm_rel_store(&state.done_atm, 1); gpr_atm_rel_store(&state.done_atm, 1);
@ -107,7 +107,7 @@ static void handle_write() {
grpc_endpoint_write(state.tcp, &state.outgoing_buffer, &on_write, nullptr); grpc_endpoint_write(state.tcp, &state.outgoing_buffer, &on_write, nullptr);
} }
static void handle_read(void* arg, grpc_error* error) { static void handle_read(void* /*arg*/, grpc_error* error) {
GPR_ASSERT(error == GRPC_ERROR_NONE); GPR_ASSERT(error == GRPC_ERROR_NONE);
state.incoming_data_length += state.temp_incoming_buffer.length; state.incoming_data_length += state.temp_incoming_buffer.length;
@ -132,7 +132,7 @@ static void handle_read(void* arg, grpc_error* error) {
} }
static void on_connect(void* arg, grpc_endpoint* tcp, static void on_connect(void* arg, grpc_endpoint* tcp,
grpc_pollset* accepting_pollset, grpc_pollset* /*accepting_pollset*/,
grpc_tcp_server_acceptor* acceptor) { grpc_tcp_server_acceptor* acceptor) {
gpr_free(acceptor); gpr_free(acceptor);
test_tcp_server* server = static_cast<test_tcp_server*>(arg); test_tcp_server* server = static_cast<test_tcp_server*>(arg);

@ -51,7 +51,7 @@ static void drain_cq(grpc_completion_queue* cq) {
} while (ev.type != GRPC_QUEUE_SHUTDOWN); } while (ev.type != GRPC_QUEUE_SHUTDOWN);
} }
static void do_nothing(void* ignored) {} static void do_nothing(void* /*ignored*/) {}
static void log_resolved_addrs(const char* label, const char* hostname) { static void log_resolved_addrs(const char* label, const char* hostname) {
grpc_resolved_addresses* res = nullptr; grpc_resolved_addresses* res = nullptr;

@ -40,7 +40,7 @@ struct fullstack_fixture_data {
}; };
static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
grpc_channel_args* client_args, grpc_channel_args* server_args) { grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) {
grpc_end2end_test_fixture f; grpc_end2end_test_fixture f;
int port = grpc_pick_unused_port_or_die(); int port = grpc_pick_unused_port_or_die();
fullstack_fixture_data* ffd = grpc_core::New<fullstack_fixture_data>(); fullstack_fixture_data* ffd = grpc_core::New<fullstack_fixture_data>();

@ -47,7 +47,7 @@ struct fullstack_compression_fixture_data {
}; };
static grpc_end2end_test_fixture chttp2_create_fixture_fullstack_compression( static grpc_end2end_test_fixture chttp2_create_fixture_fullstack_compression(
grpc_channel_args* client_args, grpc_channel_args* server_args) { grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) {
grpc_end2end_test_fixture f; grpc_end2end_test_fixture f;
int port = grpc_pick_unused_port_or_die(); int port = grpc_pick_unused_port_or_die();
fullstack_compression_fixture_data* ffd = fullstack_compression_fixture_data* ffd =

@ -36,7 +36,7 @@ struct fullstack_secure_fixture_data {
}; };
static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack( static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack(
grpc_channel_args* client_args, grpc_channel_args* server_args) { grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) {
grpc_end2end_test_fixture f; grpc_end2end_test_fixture f;
int port = grpc_pick_unused_port_or_die(); int port = grpc_pick_unused_port_or_die();
fullstack_secure_fixture_data* ffd = fullstack_secure_fixture_data* ffd =
@ -51,8 +51,9 @@ static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack(
return f; return f;
} }
static void process_auth_failure(void* state, grpc_auth_context* ctx, static void process_auth_failure(void* state, grpc_auth_context* /*ctx*/,
const grpc_metadata* md, size_t md_count, const grpc_metadata* /*md*/,
size_t /*md_count*/,
grpc_process_auth_metadata_done_cb cb, grpc_process_auth_metadata_done_cb cb,
void* user_data) { void* user_data) {
GPR_ASSERT(state == nullptr); GPR_ASSERT(state == nullptr);

@ -51,7 +51,7 @@ static void create_sockets(int sv[2]) {
} }
static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( static grpc_end2end_test_fixture chttp2_create_fixture_socketpair(
grpc_channel_args* client_args, grpc_channel_args* server_args) { grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) {
sp_fixture_data* fixture_data = sp_fixture_data* fixture_data =
static_cast<sp_fixture_data*>(gpr_malloc(sizeof(*fixture_data))); static_cast<sp_fixture_data*>(gpr_malloc(sizeof(*fixture_data)));

@ -45,7 +45,7 @@ struct fullstack_fixture_data {
}; };
static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
grpc_channel_args* client_args, grpc_channel_args* server_args) { grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) {
grpc_end2end_test_fixture f; grpc_end2end_test_fixture f;
int port = grpc_pick_unused_port_or_die(); int port = grpc_pick_unused_port_or_die();
fullstack_fixture_data* ffd = grpc_core::New<fullstack_fixture_data>(); fullstack_fixture_data* ffd = grpc_core::New<fullstack_fixture_data>();

@ -45,7 +45,7 @@ struct fullstack_fixture_data {
}; };
static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
grpc_channel_args* client_args, grpc_channel_args* server_args) { grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) {
grpc_end2end_test_fixture f; grpc_end2end_test_fixture f;
int port = grpc_pick_unused_port_or_die(); int port = grpc_pick_unused_port_or_die();
fullstack_fixture_data* ffd = grpc_core::New<fullstack_fixture_data>(); fullstack_fixture_data* ffd = grpc_core::New<fullstack_fixture_data>();

@ -44,7 +44,7 @@ struct fullstack_fixture_data {
}; };
static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
grpc_channel_args* client_args, grpc_channel_args* server_args) { grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) {
grpc_end2end_test_fixture f; grpc_end2end_test_fixture f;
int port = grpc_pick_unused_port_or_die(); int port = grpc_pick_unused_port_or_die();
fullstack_fixture_data* ffd = grpc_core::New<fullstack_fixture_data>(); fullstack_fixture_data* ffd = grpc_core::New<fullstack_fixture_data>();

@ -39,7 +39,7 @@ struct fullstack_fixture_data {
}; };
static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
grpc_channel_args* client_args, grpc_channel_args* server_args) { grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) {
grpc_end2end_test_fixture f; grpc_end2end_test_fixture f;
int port = grpc_pick_unused_port_or_die(); int port = grpc_pick_unused_port_or_die();
fullstack_fixture_data* ffd = grpc_core::New<fullstack_fixture_data>(); fullstack_fixture_data* ffd = grpc_core::New<fullstack_fixture_data>();

@ -44,7 +44,7 @@ struct fullstack_fixture_data {
}; };
static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
grpc_channel_args* client_args, grpc_channel_args* server_args) { grpc_channel_args* client_args, grpc_channel_args* /*server_args*/) {
grpc_end2end_test_fixture f; grpc_end2end_test_fixture f;
memset(&f, 0, sizeof(f)); memset(&f, 0, sizeof(f));
fullstack_fixture_data* ffd = grpc_core::New<fullstack_fixture_data>(); fullstack_fixture_data* ffd = grpc_core::New<fullstack_fixture_data>();

@ -27,7 +27,7 @@
#include "test/core/util/test_config.h" #include "test/core/util/test_config.h"
static grpc_end2end_test_fixture chttp2_create_fixture_fullstack_ipv4( static grpc_end2end_test_fixture chttp2_create_fixture_fullstack_ipv4(
grpc_channel_args* client_args, grpc_channel_args* server_args) { grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) {
grpc_end2end_test_fixture f = grpc_end2end_test_fixture f =
grpc_end2end_local_chttp2_create_fixture_fullstack(); grpc_end2end_local_chttp2_create_fixture_fullstack();
int port = grpc_pick_unused_port_or_die(); int port = grpc_pick_unused_port_or_die();

@ -27,7 +27,7 @@
#include "test/core/util/test_config.h" #include "test/core/util/test_config.h"
static grpc_end2end_test_fixture chttp2_create_fixture_fullstack_ipv6( static grpc_end2end_test_fixture chttp2_create_fixture_fullstack_ipv6(
grpc_channel_args* client_args, grpc_channel_args* server_args) { grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) {
grpc_end2end_test_fixture f = grpc_end2end_test_fixture f =
grpc_end2end_local_chttp2_create_fixture_fullstack(); grpc_end2end_local_chttp2_create_fixture_fullstack();
int port = grpc_pick_unused_port_or_die(); int port = grpc_pick_unused_port_or_die();

@ -27,7 +27,7 @@
static int unique = 1; static int unique = 1;
static grpc_end2end_test_fixture chttp2_create_fixture_fullstack_uds( static grpc_end2end_test_fixture chttp2_create_fixture_fullstack_uds(
grpc_channel_args* client_args, grpc_channel_args* server_args) { grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) {
grpc_end2end_test_fixture f = grpc_end2end_test_fixture f =
grpc_end2end_local_chttp2_create_fixture_fullstack(); grpc_end2end_local_chttp2_create_fixture_fullstack();
char* out = nullptr; char* out = nullptr;

@ -76,7 +76,7 @@ static void process_oauth2_success(void* state, grpc_auth_context* ctx,
cb(user_data, oauth2, 1, nullptr, 0, GRPC_STATUS_OK, nullptr); cb(user_data, oauth2, 1, nullptr, 0, GRPC_STATUS_OK, nullptr);
} }
static void process_oauth2_failure(void* state, grpc_auth_context* ctx, static void process_oauth2_failure(void* state, grpc_auth_context* /*ctx*/,
const grpc_metadata* md, size_t md_count, const grpc_metadata* md, size_t md_count,
grpc_process_auth_metadata_done_cb cb, grpc_process_auth_metadata_done_cb cb,
void* user_data) { void* user_data) {
@ -91,7 +91,7 @@ static void process_oauth2_failure(void* state, grpc_auth_context* ctx,
} }
static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack( static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack(
grpc_channel_args* client_args, grpc_channel_args* server_args) { grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) {
grpc_end2end_test_fixture f; grpc_end2end_test_fixture f;
int port = grpc_pick_unused_port_or_die(); int port = grpc_pick_unused_port_or_die();
fullstack_secure_fixture_data* ffd = fullstack_secure_fixture_data* ffd =

@ -74,7 +74,7 @@ static void client_setup_transport(void* ts, grpc_transport* transport) {
} }
static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( static grpc_end2end_test_fixture chttp2_create_fixture_socketpair(
grpc_channel_args* client_args, grpc_channel_args* server_args) { grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) {
grpc_endpoint_pair* sfd = grpc_endpoint_pair* sfd =
static_cast<grpc_endpoint_pair*>(gpr_malloc(sizeof(grpc_endpoint_pair))); static_cast<grpc_endpoint_pair*>(gpr_malloc(sizeof(grpc_endpoint_pair)));

@ -69,7 +69,7 @@ static void client_setup_transport(void* ts, grpc_transport* transport) {
} }
static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( static grpc_end2end_test_fixture chttp2_create_fixture_socketpair(
grpc_channel_args* client_args, grpc_channel_args* server_args) { grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) {
grpc_endpoint_pair* sfd = grpc_endpoint_pair* sfd =
static_cast<grpc_endpoint_pair*>(gpr_malloc(sizeof(grpc_endpoint_pair))); static_cast<grpc_endpoint_pair*>(gpr_malloc(sizeof(grpc_endpoint_pair)));

@ -69,7 +69,7 @@ static void client_setup_transport(void* ts, grpc_transport* transport) {
} }
static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( static grpc_end2end_test_fixture chttp2_create_fixture_socketpair(
grpc_channel_args* client_args, grpc_channel_args* server_args) { grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) {
grpc_endpoint_pair* sfd = grpc_endpoint_pair* sfd =
static_cast<grpc_endpoint_pair*>(gpr_malloc(sizeof(grpc_endpoint_pair))); static_cast<grpc_endpoint_pair*>(gpr_malloc(sizeof(grpc_endpoint_pair)));

@ -53,7 +53,7 @@ struct fullstack_secure_fixture_data {
}; };
static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack( static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack(
grpc_channel_args* client_args, grpc_channel_args* server_args) { grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) {
grpc_end2end_test_fixture f; grpc_end2end_test_fixture f;
int port = grpc_pick_unused_port_or_die(); int port = grpc_pick_unused_port_or_die();
fullstack_secure_fixture_data* ffd = fullstack_secure_fixture_data* ffd =
@ -66,8 +66,9 @@ static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack(
return f; return f;
} }
static void process_auth_failure(void* state, grpc_auth_context* ctx, static void process_auth_failure(void* state, grpc_auth_context* /*ctx*/,
const grpc_metadata* md, size_t md_count, const grpc_metadata* /*md*/,
size_t /*md_count*/,
grpc_process_auth_metadata_done_cb cb, grpc_process_auth_metadata_done_cb cb,
void* user_data) { void* user_data) {
GPR_ASSERT(state == nullptr); GPR_ASSERT(state == nullptr);
@ -136,7 +137,7 @@ static int server_authz_check_async(
// Synchronous implementation of schedule field in // Synchronous implementation of schedule field in
// grpc_tls_credential_reload_config instance that is a part of client-side // grpc_tls_credential_reload_config instance that is a part of client-side
// grpc_tls_credentials_options instance. // grpc_tls_credentials_options instance.
static int client_cred_reload_sync(void* config_user_data, static int client_cred_reload_sync(void* /*config_user_data*/,
grpc_tls_credential_reload_arg* arg) { grpc_tls_credential_reload_arg* arg) {
if (!arg->key_materials_config->pem_key_cert_pair_list().empty()) { if (!arg->key_materials_config->pem_key_cert_pair_list().empty()) {
arg->status = GRPC_SSL_CERTIFICATE_CONFIG_RELOAD_UNCHANGED; arg->status = GRPC_SSL_CERTIFICATE_CONFIG_RELOAD_UNCHANGED;
@ -162,7 +163,7 @@ static int client_cred_reload_sync(void* config_user_data,
// Synchronous implementation of schedule field in // Synchronous implementation of schedule field in
// grpc_tls_credential_reload_config instance that is a part of server-side // grpc_tls_credential_reload_config instance that is a part of server-side
// grpc_tls_credentials_options instance. // grpc_tls_credentials_options instance.
static int server_cred_reload_sync(void* config_user_data, static int server_cred_reload_sync(void* /*config_user_data*/,
grpc_tls_credential_reload_arg* arg) { grpc_tls_credential_reload_arg* arg) {
if (!arg->key_materials_config->pem_key_cert_pair_list().empty()) { if (!arg->key_materials_config->pem_key_cert_pair_list().empty()) {
arg->status = GRPC_SSL_CERTIFICATE_CONFIG_RELOAD_UNCHANGED; arg->status = GRPC_SSL_CERTIFICATE_CONFIG_RELOAD_UNCHANGED;

@ -39,7 +39,7 @@ struct fullstack_secure_fixture_data {
}; };
static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack( static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack(
grpc_channel_args* client_args, grpc_channel_args* server_args) { grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) {
grpc_end2end_test_fixture f; grpc_end2end_test_fixture f;
int port = grpc_pick_unused_port_or_die(); int port = grpc_pick_unused_port_or_die();
fullstack_secure_fixture_data* ffd = fullstack_secure_fixture_data* ffd =
@ -55,8 +55,9 @@ static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack(
return f; return f;
} }
static void process_auth_failure(void* state, grpc_auth_context* ctx, static void process_auth_failure(void* state, grpc_auth_context* /*ctx*/,
const grpc_metadata* md, size_t md_count, const grpc_metadata* /*md*/,
size_t /*md_count*/,
grpc_process_auth_metadata_done_cb cb, grpc_process_auth_metadata_done_cb cb,
void* user_data) { void* user_data) {
GPR_ASSERT(state == nullptr); GPR_ASSERT(state == nullptr);

@ -60,7 +60,7 @@ ssl_server_certificate_config_callback(
} }
static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack( static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack(
grpc_channel_args* client_args, grpc_channel_args* server_args) { grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) {
grpc_end2end_test_fixture f; grpc_end2end_test_fixture f;
int port = grpc_pick_unused_port_or_die(); int port = grpc_pick_unused_port_or_die();
fullstack_secure_fixture_data* ffd = fullstack_secure_fixture_data* ffd =
@ -75,8 +75,9 @@ static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack(
return f; return f;
} }
static void process_auth_failure(void* state, grpc_auth_context* ctx, static void process_auth_failure(void* state, grpc_auth_context* /*ctx*/,
const grpc_metadata* md, size_t md_count, const grpc_metadata* /*md*/,
size_t /*md_count*/,
grpc_process_auth_metadata_done_cb cb, grpc_process_auth_metadata_done_cb cb,
void* user_data) { void* user_data) {
GPR_ASSERT(state == nullptr); GPR_ASSERT(state == nullptr);

@ -91,8 +91,9 @@ static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack(
return f; return f;
} }
static void process_auth_failure(void* state, grpc_auth_context* ctx, static void process_auth_failure(void* state, grpc_auth_context* /*ctx*/,
const grpc_metadata* md, size_t md_count, const grpc_metadata* /*md*/,
size_t /*md_count*/,
grpc_process_auth_metadata_done_cb cb, grpc_process_auth_metadata_done_cb cb,
void* user_data) { void* user_data) {
GPR_ASSERT(state == nullptr); GPR_ASSERT(state == nullptr);

@ -44,7 +44,7 @@ typedef struct fullstack_fixture_data {
static int unique = 1; static int unique = 1;
static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
grpc_channel_args* client_args, grpc_channel_args* server_args) { grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) {
grpc_end2end_test_fixture f; grpc_end2end_test_fixture f;
fullstack_fixture_data* ffd = static_cast<fullstack_fixture_data*>( fullstack_fixture_data* ffd = static_cast<fullstack_fixture_data*>(
gpr_malloc(sizeof(fullstack_fixture_data))); gpr_malloc(sizeof(fullstack_fixture_data)));

@ -38,7 +38,7 @@ typedef struct inproc_fixture_data {
} inproc_fixture_data; } inproc_fixture_data;
static grpc_end2end_test_fixture inproc_create_fixture( static grpc_end2end_test_fixture inproc_create_fixture(
grpc_channel_args* client_args, grpc_channel_args* server_args) { grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) {
grpc_end2end_test_fixture f; grpc_end2end_test_fixture f;
inproc_fixture_data* ffd = static_cast<inproc_fixture_data*>( inproc_fixture_data* ffd = static_cast<inproc_fixture_data*>(
gpr_malloc(sizeof(inproc_fixture_data))); gpr_malloc(sizeof(inproc_fixture_data)));

@ -52,7 +52,7 @@ using grpc_core::testing::input_stream;
bool squelch = true; bool squelch = true;
bool leak_check = true; bool leak_check = true;
static void dont_log(gpr_log_func_args* args) {} static void dont_log(gpr_log_func_args* /*args*/) {}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// global state // global state
@ -358,8 +358,8 @@ static void finish_resolve(void* arg, grpc_error* error) {
grpc_core::Delete(r); grpc_core::Delete(r);
} }
void my_resolve_address(const char* addr, const char* default_port, void my_resolve_address(const char* addr, const char* /*default_port*/,
grpc_pollset_set* interested_parties, grpc_pollset_set* /*interested_parties*/,
grpc_closure* on_done, grpc_closure* on_done,
grpc_resolved_addresses** addrs) { grpc_resolved_addresses** addrs) {
addr_req* r = grpc_core::New<addr_req>(); addr_req* r = grpc_core::New<addr_req>();
@ -375,11 +375,11 @@ static grpc_address_resolver_vtable fuzzer_resolver = {my_resolve_address,
nullptr}; nullptr};
grpc_ares_request* my_dns_lookup_ares_locked( grpc_ares_request* my_dns_lookup_ares_locked(
const char* dns_server, const char* addr, const char* default_port, const char* /*dns_server*/, const char* addr, const char* /*default_port*/,
grpc_pollset_set* interested_parties, grpc_closure* on_done, grpc_pollset_set* /*interested_parties*/, grpc_closure* on_done,
grpc_core::UniquePtr<grpc_core::ServerAddressList>* addresses, grpc_core::UniquePtr<grpc_core::ServerAddressList>* addresses,
bool check_grpclb, char** service_config_json, int query_timeout, bool /*check_grpclb*/, char** /*service_config_json*/,
grpc_core::Combiner* combiner) { int /*query_timeout*/, grpc_core::Combiner* /*combiner*/) {
addr_req* r = static_cast<addr_req*>(gpr_malloc(sizeof(*r))); addr_req* r = static_cast<addr_req*>(gpr_malloc(sizeof(*r)));
r->addr = gpr_strdup(addr); r->addr = gpr_strdup(addr);
r->on_done = on_done; r->on_done = on_done;
@ -450,9 +450,9 @@ static void sched_connect(grpc_closure* closure, grpc_endpoint** ep,
} }
static void my_tcp_client_connect(grpc_closure* closure, grpc_endpoint** ep, static void my_tcp_client_connect(grpc_closure* closure, grpc_endpoint** ep,
grpc_pollset_set* interested_parties, grpc_pollset_set* /*interested_parties*/,
const grpc_channel_args* channel_args, const grpc_channel_args* /*channel_args*/,
const grpc_resolved_address* addr, const grpc_resolved_address* /*addr*/,
grpc_millis deadline) { grpc_millis deadline) {
sched_connect(closure, ep, sched_connect(closure, ep,
grpc_millis_to_timespec(deadline, GPR_CLOCK_MONOTONIC)); grpc_millis_to_timespec(deadline, GPR_CLOCK_MONOTONIC));
@ -481,7 +481,7 @@ static void assert_success_and_decrement(void* counter, bool success) {
--*static_cast<int*>(counter); --*static_cast<int*>(counter);
} }
static void decrement(void* counter, bool success) { static void decrement(void* counter, bool /*success*/) {
--*static_cast<int*>(counter); --*static_cast<int*>(counter);
} }
@ -662,7 +662,7 @@ typedef struct {
uint8_t has_ops; uint8_t has_ops;
} batch_info; } batch_info;
static void finished_batch(void* p, bool success) { static void finished_batch(void* p, bool /*success*/) {
batch_info* bi = static_cast<batch_info*>(p); batch_info* bi = static_cast<batch_info*>(p);
--bi->cs->pending_ops; --bi->cs->pending_ops;
if ((bi->has_ops & (1u << GRPC_OP_RECV_MESSAGE)) && if ((bi->has_ops & (1u << GRPC_OP_RECV_MESSAGE)) &&

@ -33,11 +33,11 @@
bool squelch = true; bool squelch = true;
bool leak_check = true; bool leak_check = true;
static void discard_write(grpc_slice slice) {} static void discard_write(grpc_slice /*slice*/) {}
static void* tag(int n) { return (void*)static_cast<uintptr_t>(n); } static void* tag(int n) { return (void*)static_cast<uintptr_t>(n); }
static void dont_log(gpr_log_func_args* args) {} static void dont_log(gpr_log_func_args* /*args*/) {}
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
grpc_test_only_set_slice_hash_seed(0); grpc_test_only_set_slice_hash_seed(0);

@ -29,12 +29,12 @@
bool squelch = true; bool squelch = true;
bool leak_check = true; bool leak_check = true;
static void discard_write(grpc_slice slice) {} static void discard_write(grpc_slice /*slice*/) {}
static void* tag(int n) { return (void*)static_cast<uintptr_t>(n); } static void* tag(int n) { return (void*)static_cast<uintptr_t>(n); }
static int detag(void* p) { return static_cast<int>((uintptr_t)p); } static int detag(void* p) { return static_cast<int>((uintptr_t)p); }
static void dont_log(gpr_log_func_args* args) {} static void dont_log(gpr_log_func_args* /*args*/) {}
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
grpc_test_only_set_slice_hash_seed(0); grpc_test_only_set_slice_hash_seed(0);

@ -45,7 +45,7 @@ struct fullstack_secure_fixture_data {
}; };
static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack( static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack(
grpc_channel_args* client_args, grpc_channel_args* server_args) { grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) {
grpc_end2end_test_fixture f; grpc_end2end_test_fixture f;
int port = grpc_pick_unused_port_or_die(); int port = grpc_pick_unused_port_or_die();
fullstack_secure_fixture_data* ffd = fullstack_secure_fixture_data* ffd =
@ -59,8 +59,9 @@ static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack(
return f; return f;
} }
static void process_auth_failure(void* state, grpc_auth_context* ctx, static void process_auth_failure(void* state, grpc_auth_context* /*ctx*/,
const grpc_metadata* md, size_t md_count, const grpc_metadata* /*md*/,
size_t /*md_count*/,
grpc_process_auth_metadata_done_cb cb, grpc_process_auth_metadata_done_cb cb,
void* user_data) { void* user_data) {
GPR_ASSERT(state == nullptr); GPR_ASSERT(state == nullptr);

@ -74,7 +74,7 @@ class ShutdownCallback : public grpc_experimental_completion_queue_functor {
auto* callback = static_cast<ShutdownCallback*>(cb); auto* callback = static_cast<ShutdownCallback*>(cb);
callback->Run(static_cast<bool>(ok)); callback->Run(static_cast<bool>(ok));
} }
void Run(bool ok) { void Run(bool /*ok*/) {
gpr_log(GPR_DEBUG, "CQ shutdown notification invoked"); gpr_log(GPR_DEBUG, "CQ shutdown notification invoked");
gpr_mu_lock(&mu_); gpr_mu_lock(&mu_);
done_ = true; done_ = true;
@ -205,7 +205,7 @@ static grpc_experimental_completion_queue_functor* tag(intptr_t t) {
} }
static grpc_end2end_test_fixture inproc_create_fixture( static grpc_end2end_test_fixture inproc_create_fixture(
grpc_channel_args* client_args, grpc_channel_args* server_args) { grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) {
grpc_end2end_test_fixture f; grpc_end2end_test_fixture f;
inproc_fixture_data* ffd = static_cast<inproc_fixture_data*>( inproc_fixture_data* ffd = static_cast<inproc_fixture_data*>(
gpr_malloc(sizeof(inproc_fixture_data))); gpr_malloc(sizeof(inproc_fixture_data)));
@ -259,7 +259,7 @@ static gpr_timespec n_seconds_from_now(int n) {
static gpr_timespec five_seconds_from_now() { return n_seconds_from_now(5); } static gpr_timespec five_seconds_from_now() { return n_seconds_from_now(5); }
static void drain_cq(grpc_completion_queue* cq) { static void drain_cq(grpc_completion_queue* /*cq*/) {
// Wait for the shutdown callback to arrive, or fail the test // Wait for the shutdown callback to arrive, or fail the test
GPR_ASSERT(g_shutdown_callback->Wait(five_seconds_from_now())); GPR_ASSERT(g_shutdown_callback->Wait(five_seconds_from_now()));
gpr_log(GPR_DEBUG, "CQ shutdown wait complete"); gpr_log(GPR_DEBUG, "CQ shutdown wait complete");

@ -26,7 +26,7 @@ typedef struct {
const char* expect_details; const char* expect_details;
} cancellation_mode; } cancellation_mode;
static grpc_call_error wait_for_deadline(grpc_call* call, void* reserved) { static grpc_call_error wait_for_deadline(grpc_call* /*call*/, void* reserved) {
(void)reserved; (void)reserved;
return GRPC_CALL_OK; return GRPC_CALL_OK;
} }

@ -89,7 +89,7 @@ static void end_test(grpc_end2end_test_fixture* f) {
grpc_completion_queue_destroy(f->shutdown_cq); grpc_completion_queue_destroy(f->shutdown_cq);
} }
static void run_one_request(grpc_end2end_test_config config, static void run_one_request(grpc_end2end_test_config /*config*/,
grpc_end2end_test_fixture f, grpc_end2end_test_fixture f,
bool request_is_success) { bool request_is_success) {
grpc_call* c; grpc_call* c;

@ -186,7 +186,7 @@ static void cb_watch_connectivity(
} }
static void cb_shutdown(grpc_experimental_completion_queue_functor* functor, static void cb_shutdown(grpc_experimental_completion_queue_functor* functor,
int success) { int /*success*/) {
CallbackContext* cb_ctx = (CallbackContext*)functor; CallbackContext* cb_ctx = (CallbackContext*)functor;
gpr_log(GPR_DEBUG, "cb_shutdown called, nothing to do"); gpr_log(GPR_DEBUG, "cb_shutdown called, nothing to do");

@ -394,23 +394,23 @@ static void test_client_subchannel_filter(grpc_end2end_test_config config) {
* Test filter - always fails to initialize a call * Test filter - always fails to initialize a call
*/ */
static grpc_error* init_call_elem(grpc_call_element* elem, static grpc_error* init_call_elem(grpc_call_element* /*elem*/,
const grpc_call_element_args* args) { const grpc_call_element_args* /*args*/) {
return grpc_error_set_int( return grpc_error_set_int(
GRPC_ERROR_CREATE_FROM_STATIC_STRING("access denied"), GRPC_ERROR_CREATE_FROM_STATIC_STRING("access denied"),
GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_PERMISSION_DENIED); GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_PERMISSION_DENIED);
} }
static void destroy_call_elem(grpc_call_element* elem, static void destroy_call_elem(grpc_call_element* /*elem*/,
const grpc_call_final_info* final_info, const grpc_call_final_info* /*final_info*/,
grpc_closure* ignored) {} grpc_closure* /*ignored*/) {}
static grpc_error* init_channel_elem(grpc_channel_element* elem, static grpc_error* init_channel_elem(grpc_channel_element* /*elem*/,
grpc_channel_element_args* args) { grpc_channel_element_args* /*args*/) {
return GRPC_ERROR_NONE; return GRPC_ERROR_NONE;
} }
static void destroy_channel_elem(grpc_channel_element* elem) {} static void destroy_channel_elem(grpc_channel_element* /*elem*/) {}
static const grpc_channel_filter test_filter = { static const grpc_channel_filter test_filter = {
grpc_call_next_op, grpc_call_next_op,
@ -430,7 +430,7 @@ static const grpc_channel_filter test_filter = {
*/ */
static bool maybe_add_server_channel_filter(grpc_channel_stack_builder* builder, static bool maybe_add_server_channel_filter(grpc_channel_stack_builder* builder,
void* arg) { void* /*arg*/) {
if (g_enable_server_channel_filter) { if (g_enable_server_channel_filter) {
// Want to add the filter as close to the end as possible, to make // Want to add the filter as close to the end as possible, to make
// sure that all of the filters work well together. However, we // sure that all of the filters work well together. However, we
@ -449,7 +449,7 @@ static bool maybe_add_server_channel_filter(grpc_channel_stack_builder* builder,
} }
static bool maybe_add_client_channel_filter(grpc_channel_stack_builder* builder, static bool maybe_add_client_channel_filter(grpc_channel_stack_builder* builder,
void* arg) { void* /*arg*/) {
if (g_enable_client_channel_filter) { if (g_enable_client_channel_filter) {
// Want to add the filter as close to the end as possible, to make // Want to add the filter as close to the end as possible, to make
// sure that all of the filters work well together. However, we // sure that all of the filters work well together. However, we
@ -468,7 +468,7 @@ static bool maybe_add_client_channel_filter(grpc_channel_stack_builder* builder,
} }
static bool maybe_add_client_subchannel_filter( static bool maybe_add_client_subchannel_filter(
grpc_channel_stack_builder* builder, void* arg) { grpc_channel_stack_builder* builder, void* /*arg*/) {
if (g_enable_client_subchannel_filter) { if (g_enable_client_subchannel_filter) {
// Want to add the filter as close to the end as possible, to make // Want to add the filter as close to the end as possible, to make
// sure that all of the filters work well together. However, we // sure that all of the filters work well together. However, we

@ -218,21 +218,21 @@ static void start_transport_stream_op_batch(
grpc_call_next_op(elem, op); grpc_call_next_op(elem, op);
} }
static grpc_error* init_call_elem(grpc_call_element* elem, static grpc_error* init_call_elem(grpc_call_element* /*elem*/,
const grpc_call_element_args* args) { const grpc_call_element_args* /*args*/) {
return GRPC_ERROR_NONE; return GRPC_ERROR_NONE;
} }
static void destroy_call_elem(grpc_call_element* elem, static void destroy_call_elem(grpc_call_element* /*elem*/,
const grpc_call_final_info* final_info, const grpc_call_final_info* /*final_info*/,
grpc_closure* ignored) {} grpc_closure* /*ignored*/) {}
static grpc_error* init_channel_elem(grpc_channel_element* elem, static grpc_error* init_channel_elem(grpc_channel_element* /*elem*/,
grpc_channel_element_args* args) { grpc_channel_element_args* /*args*/) {
return GRPC_ERROR_NONE; return GRPC_ERROR_NONE;
} }
static void destroy_channel_elem(grpc_channel_element* elem) {} static void destroy_channel_elem(grpc_channel_element* /*elem*/) {}
static const grpc_channel_filter test_filter = { static const grpc_channel_filter test_filter = {
start_transport_stream_op_batch, start_transport_stream_op_batch,
@ -251,7 +251,8 @@ static const grpc_channel_filter test_filter = {
* Registration * Registration
*/ */
static bool maybe_add_filter(grpc_channel_stack_builder* builder, void* arg) { static bool maybe_add_filter(grpc_channel_stack_builder* builder,
void* /*arg*/) {
if (g_enable_filter) { if (g_enable_filter) {
return grpc_channel_stack_builder_prepend_filter(builder, &test_filter, return grpc_channel_stack_builder_prepend_filter(builder, &test_filter,
nullptr, nullptr); nullptr, nullptr);

@ -247,16 +247,16 @@ static void start_transport_stream_op_batch(
grpc_call_next_op(elem, batch); grpc_call_next_op(elem, batch);
} }
static void destroy_call_elem(grpc_call_element* elem, static void destroy_call_elem(grpc_call_element* /*elem*/,
const grpc_call_final_info* final_info, const grpc_call_final_info* /*final_info*/,
grpc_closure* ignored) {} grpc_closure* /*ignored*/) {}
static grpc_error* init_channel_elem(grpc_channel_element* elem, static grpc_error* init_channel_elem(grpc_channel_element* /*elem*/,
grpc_channel_element_args* args) { grpc_channel_element_args* /*args*/) {
return GRPC_ERROR_NONE; return GRPC_ERROR_NONE;
} }
static void destroy_channel_elem(grpc_channel_element* elem) {} static void destroy_channel_elem(grpc_channel_element* /*elem*/) {}
static const grpc_channel_filter test_filter = { static const grpc_channel_filter test_filter = {
start_transport_stream_op_batch, start_transport_stream_op_batch,

@ -247,33 +247,33 @@ static void test_request(grpc_end2end_test_config config) {
* Test latency filter * Test latency filter
*/ */
static grpc_error* init_call_elem(grpc_call_element* elem, static grpc_error* init_call_elem(grpc_call_element* /*elem*/,
const grpc_call_element_args* args) { const grpc_call_element_args* /*args*/) {
return GRPC_ERROR_NONE; return GRPC_ERROR_NONE;
} }
static void client_destroy_call_elem(grpc_call_element* elem, static void client_destroy_call_elem(grpc_call_element* /*elem*/,
const grpc_call_final_info* final_info, const grpc_call_final_info* final_info,
grpc_closure* ignored) { grpc_closure* /*ignored*/) {
gpr_mu_lock(&g_mu); gpr_mu_lock(&g_mu);
g_client_latency = final_info->stats.latency; g_client_latency = final_info->stats.latency;
gpr_mu_unlock(&g_mu); gpr_mu_unlock(&g_mu);
} }
static void server_destroy_call_elem(grpc_call_element* elem, static void server_destroy_call_elem(grpc_call_element* /*elem*/,
const grpc_call_final_info* final_info, const grpc_call_final_info* final_info,
grpc_closure* ignored) { grpc_closure* /*ignored*/) {
gpr_mu_lock(&g_mu); gpr_mu_lock(&g_mu);
g_server_latency = final_info->stats.latency; g_server_latency = final_info->stats.latency;
gpr_mu_unlock(&g_mu); gpr_mu_unlock(&g_mu);
} }
static grpc_error* init_channel_elem(grpc_channel_element* elem, static grpc_error* init_channel_elem(grpc_channel_element* /*elem*/,
grpc_channel_element_args* args) { grpc_channel_element_args* /*args*/) {
return GRPC_ERROR_NONE; return GRPC_ERROR_NONE;
} }
static void destroy_channel_elem(grpc_channel_element* elem) {} static void destroy_channel_elem(grpc_channel_element* /*elem*/) {}
static const grpc_channel_filter test_client_filter = { static const grpc_channel_filter test_client_filter = {
grpc_call_next_op, grpc_call_next_op,

@ -284,7 +284,7 @@ static grpc_error* init_call_elem(grpc_call_element* elem,
static void client_destroy_call_elem(grpc_call_element* elem, static void client_destroy_call_elem(grpc_call_element* elem,
const grpc_call_final_info* final_info, const grpc_call_final_info* final_info,
grpc_closure* ignored) { grpc_closure* /*ignored*/) {
final_status_data* data = static_cast<final_status_data*>(elem->call_data); final_status_data* data = static_cast<final_status_data*>(elem->call_data);
gpr_mu_lock(&g_mu); gpr_mu_lock(&g_mu);
// Some fixtures, like proxies, will spawn intermidiate calls // Some fixtures, like proxies, will spawn intermidiate calls
@ -299,7 +299,7 @@ static void client_destroy_call_elem(grpc_call_element* elem,
static void server_destroy_call_elem(grpc_call_element* elem, static void server_destroy_call_elem(grpc_call_element* elem,
const grpc_call_final_info* final_info, const grpc_call_final_info* final_info,
grpc_closure* ignored) { grpc_closure* /*ignored*/) {
final_status_data* data = static_cast<final_status_data*>(elem->call_data); final_status_data* data = static_cast<final_status_data*>(elem->call_data);
gpr_mu_lock(&g_mu); gpr_mu_lock(&g_mu);
// Some fixtures, like proxies, will spawn intermidiate calls // Some fixtures, like proxies, will spawn intermidiate calls
@ -312,12 +312,12 @@ static void server_destroy_call_elem(grpc_call_element* elem,
gpr_mu_unlock(&g_mu); gpr_mu_unlock(&g_mu);
} }
static grpc_error* init_channel_elem(grpc_channel_element* elem, static grpc_error* init_channel_elem(grpc_channel_element* /*elem*/,
grpc_channel_element_args* args) { grpc_channel_element_args* /*args*/) {
return GRPC_ERROR_NONE; return GRPC_ERROR_NONE;
} }
static void destroy_channel_elem(grpc_channel_element* elem) {} static void destroy_channel_elem(grpc_channel_element* /*elem*/) {}
static const grpc_channel_filter test_client_filter = { static const grpc_channel_filter test_client_filter = {
grpc_call_next_op, grpc_call_next_op,

@ -87,7 +87,7 @@ static void end_test(grpc_end2end_test_fixture* f) {
grpc_completion_queue_destroy(f->shutdown_cq); grpc_completion_queue_destroy(f->shutdown_cq);
} }
static void simple_request_body(grpc_end2end_test_config config, static void simple_request_body(grpc_end2end_test_config /*config*/,
grpc_end2end_test_fixture f) { grpc_end2end_test_fixture f) {
grpc_call* c; grpc_call* c;
grpc_call* s; grpc_call* s;

@ -113,7 +113,7 @@ static void end_test(grpc_end2end_test_fixture* f) {
grpc_completion_queue_destroy(f->shutdown_cq); grpc_completion_queue_destroy(f->shutdown_cq);
} }
static void simple_request_body(grpc_end2end_test_config config, static void simple_request_body(grpc_end2end_test_config /*config*/,
grpc_end2end_test_fixture f) { grpc_end2end_test_fixture f) {
grpc_call* c; grpc_call* c;
grpc_call* s; grpc_call* s;

@ -269,8 +269,8 @@ static void request_with_payload_template(
uint32_t client_send_flags_bitmask, uint32_t client_send_flags_bitmask,
grpc_compression_algorithm default_client_channel_compression_algorithm, grpc_compression_algorithm default_client_channel_compression_algorithm,
grpc_compression_algorithm default_server_channel_compression_algorithm, grpc_compression_algorithm default_server_channel_compression_algorithm,
grpc_compression_algorithm expected_client_compression_algorithm, grpc_compression_algorithm /*expected_client_compression_algorithm*/,
grpc_compression_algorithm expected_server_compression_algorithm, grpc_compression_algorithm /*expected_server_compression_algorithm*/,
grpc_metadata* client_init_metadata, bool set_server_level, grpc_metadata* client_init_metadata, bool set_server_level,
grpc_compression_level server_compression_level, grpc_compression_level server_compression_level,
bool send_message_before_initial_metadata, bool send_message_before_initial_metadata,

@ -104,7 +104,7 @@ static grpc_slice generate_random_slice() {
return out; return out;
} }
static void request_response_with_payload(grpc_end2end_test_config config, static void request_response_with_payload(grpc_end2end_test_config /*config*/,
grpc_end2end_test_fixture f) { grpc_end2end_test_fixture f) {
/* Create large request and response bodies. These are big enough to require /* Create large request and response bodies. These are big enough to require
* multiple round trips to deliver to the peer, and their exact contents of * multiple round trips to deliver to the peer, and their exact contents of

@ -27,7 +27,7 @@
#include "test/core/util/port.h" #include "test/core/util/port.h"
#include "test/core/util/subprocess.h" #include "test/core/util/subprocess.h"
int main(int argc, char** argv) { int main(int /*argc*/, char** argv) {
char* me = argv[0]; char* me = argv[0];
char* lslash = strrchr(me, '/'); char* lslash = strrchr(me, '/');
char root[1024]; char root[1024];

@ -28,7 +28,7 @@
#include "test/core/util/port.h" #include "test/core/util/port.h"
#include "test/core/util/subprocess.h" #include "test/core/util/subprocess.h"
int main(int argc, const char** argv) { int main(int /*argc*/, const char** argv) {
const char* me = argv[0]; const char* me = argv[0];
const char* lslash = strrchr(me, '/'); const char* lslash = strrchr(me, '/');
char root[1024]; char root[1024];

@ -167,7 +167,7 @@ static void start_send_status(void) {
/* We have some sort of deadlock, so let's not exit gracefully for now. /* We have some sort of deadlock, so let's not exit gracefully for now.
When that is resolved, please remove the #include <unistd.h> above. */ When that is resolved, please remove the #include <unistd.h> above. */
static void sigint_handler(int x) { _exit(0); } static void sigint_handler(int /*x*/) { _exit(0); }
int main(int argc, char** argv) { int main(int argc, char** argv) {
grpc_event ev; grpc_event ev;

@ -37,11 +37,13 @@ static void test_callback(gpr_log_func_args* args) {
GPR_ASSERT(0 == strcmp(args->message, "hello 1 2 3")); GPR_ASSERT(0 == strcmp(args->message, "hello 1 2 3"));
} }
static void test_should_log(gpr_log_func_args* args) { static void test_should_log(gpr_log_func_args* /*args*/) {
log_func_reached = true; log_func_reached = true;
} }
static void test_should_not_log(gpr_log_func_args* args) { GPR_ASSERT(false); } static void test_should_not_log(gpr_log_func_args* /*args*/) {
GPR_ASSERT(false);
}
#define test_log_function_reached(SEVERITY) \ #define test_log_function_reached(SEVERITY) \
gpr_set_log_function(test_should_log); \ gpr_set_log_function(test_should_log); \

@ -33,7 +33,7 @@
GPR_TLS_DECL(test_var); GPR_TLS_DECL(test_var);
static void thd_body(void* arg) { static void thd_body(void* /*arg*/) {
intptr_t i; intptr_t i;
GPR_ASSERT(gpr_tls_get(&test_var) == 0); GPR_ASSERT(gpr_tls_get(&test_var) == 0);

@ -39,7 +39,7 @@ bool IsConfigErrorCalled() { return g_config_error_function_called; }
// This function is for preventing the program from invoking // This function is for preventing the program from invoking
// an error handler due to configuration error and // an error handler due to configuration error and
// make test routines know whether there is error. // make test routines know whether there is error.
void FakeConfigErrorFunction(const char* error_message) { void FakeConfigErrorFunction(const char* /*error_message*/) {
g_config_error_function_called = true; g_config_error_function_called = true;
} }

@ -75,7 +75,7 @@ static void test1(void) {
gpr_cv_destroy(&t.done_cv); gpr_cv_destroy(&t.done_cv);
} }
static void thd_body2(void* v) {} static void thd_body2(void* /*v*/) {}
/* Test that we can create a number of threads and join them. */ /* Test that we can create a number of threads and join them. */
static void test2(void) { static void test2(void) {

@ -98,7 +98,7 @@ static int create_socket(int* out_port) {
// Server callback during ALPN negotiation. See man page for // Server callback during ALPN negotiation. See man page for
// SSL_CTX_set_alpn_select_cb. // SSL_CTX_set_alpn_select_cb.
static int alpn_select_cb(SSL* ssl, const uint8_t** out, uint8_t* out_len, static int alpn_select_cb(SSL* /*ssl*/, const uint8_t** out, uint8_t* out_len,
const uint8_t* in, unsigned in_len, void* arg) { const uint8_t* in, unsigned in_len, void* arg) {
const uint8_t* alpn_preferred = static_cast<const uint8_t*>(arg); const uint8_t* alpn_preferred = static_cast<const uint8_t*>(arg);
@ -309,7 +309,7 @@ static bool client_ssl_test(char* server_alpn_preferred) {
return success; return success;
} }
int main(int argc, char* argv[]) { int main(int /*argc*/, char* /*argv*/ []) {
// Handshake succeeeds when the server has grpc-exp as the ALPN preference. // Handshake succeeeds when the server has grpc-exp as the ALPN preference.
GPR_ASSERT(client_ssl_test(const_cast<char*>("grpc-exp"))); GPR_ASSERT(client_ssl_test(const_cast<char*>("grpc-exp")));
// Handshake succeeeds when the server has h2 as the ALPN preference. This // Handshake succeeeds when the server has h2 as the ALPN preference. This

@ -55,8 +55,8 @@ class ReadAheadHandshaker : public Handshaker {
public: public:
virtual ~ReadAheadHandshaker() {} virtual ~ReadAheadHandshaker() {}
const char* name() const override { return "read_ahead"; } const char* name() const override { return "read_ahead"; }
void Shutdown(grpc_error* why) override {} void Shutdown(grpc_error* /*why*/) override {}
void DoHandshake(grpc_tcp_server_acceptor* acceptor, void DoHandshake(grpc_tcp_server_acceptor* /*acceptor*/,
grpc_closure* on_handshake_done, grpc_closure* on_handshake_done,
HandshakerArgs* args) override { HandshakerArgs* args) override {
grpc_endpoint_read(args->endpoint, args->read_buffer, on_handshake_done, grpc_endpoint_read(args->endpoint, args->read_buffer, on_handshake_done,
@ -66,8 +66,8 @@ class ReadAheadHandshaker : public Handshaker {
class ReadAheadHandshakerFactory : public HandshakerFactory { class ReadAheadHandshakerFactory : public HandshakerFactory {
public: public:
void AddHandshakers(const grpc_channel_args* args, void AddHandshakers(const grpc_channel_args* /*args*/,
grpc_pollset_set* interested_parties, grpc_pollset_set* /*interested_parties*/,
HandshakeManager* handshake_mgr) override { HandshakeManager* handshake_mgr) override {
handshake_mgr->Add(MakeRefCounted<ReadAheadHandshaker>()); handshake_mgr->Add(MakeRefCounted<ReadAheadHandshaker>());
} }
@ -76,7 +76,7 @@ class ReadAheadHandshakerFactory : public HandshakerFactory {
} // namespace grpc_core } // namespace grpc_core
int main(int argc, char* argv[]) { int main(int /*argc*/, char* /*argv*/ []) {
using namespace grpc_core; using namespace grpc_core;
grpc_init(); grpc_init();
HandshakerRegistry::RegisterHandshakerFactory( HandshakerRegistry::RegisterHandshakerFactory(

@ -36,7 +36,7 @@
#include "test/core/handshake/server_ssl_common.h" #include "test/core/handshake/server_ssl_common.h"
int main(int argc, char* argv[]) { int main(int /*argc*/, char* /*argv*/ []) {
// Handshake succeeeds when the client supplies the standard ALPN list. // Handshake succeeeds when the client supplies the standard ALPN list.
const char* full_alpn_list[] = {"grpc-exp", "h2"}; const char* full_alpn_list[] = {"grpc-exp", "h2"};
GPR_ASSERT(server_ssl_test(full_alpn_list, 2, "grpc-exp")); GPR_ASSERT(server_ssl_test(full_alpn_list, 2, "grpc-exp"));

@ -228,7 +228,7 @@ static int verify_callback(const char* target_host, const char* target_pem,
static void verify_destruct(void* userdata) { destruct_userdata = userdata; } static void verify_destruct(void* userdata) { destruct_userdata = userdata; }
int main(int argc, char* argv[]) { int main(int /*argc*/, char* /*argv*/ []) {
int userdata = 42; int userdata = 42;
verify_peer_options verify_options; verify_peer_options verify_options;

@ -138,7 +138,7 @@ static void test_post(int port) {
grpc_http_response_destroy(&response); grpc_http_response_destroy(&response);
} }
static void destroy_pops(void* p, grpc_error* error) { static void destroy_pops(void* p, grpc_error* /*error*/) {
grpc_pollset_destroy( grpc_pollset_destroy(
grpc_polling_entity_pollset(static_cast<grpc_polling_entity*>(p))); grpc_polling_entity_pollset(static_cast<grpc_polling_entity*>(p)));
} }

@ -143,7 +143,7 @@ static void test_post(int port) {
grpc_http_response_destroy(&response); grpc_http_response_destroy(&response);
} }
static void destroy_pops(void* p, grpc_error* error) { static void destroy_pops(void* p, grpc_error* /*error*/) {
grpc_pollset_destroy( grpc_pollset_destroy(
grpc_polling_entity_pollset(static_cast<grpc_polling_entity*>(p))); grpc_polling_entity_pollset(static_cast<grpc_polling_entity*>(p)));
} }

@ -27,7 +27,7 @@
#ifdef GRPC_LINUX_ERRQUEUE #ifdef GRPC_LINUX_ERRQUEUE
static void TestShutdownFlushesListVerifier(void* arg, static void TestShutdownFlushesListVerifier(void* arg,
grpc_core::Timestamps* ts, grpc_core::Timestamps* /*ts*/,
grpc_error* error) { grpc_error* error) {
GPR_ASSERT(error == GRPC_ERROR_NONE); GPR_ASSERT(error == GRPC_ERROR_NONE);
GPR_ASSERT(arg != nullptr); GPR_ASSERT(arg != nullptr);

@ -32,7 +32,7 @@ static void test_no_op(void) {
GRPC_COMBINER_UNREF(grpc_combiner_create(), "test_no_op"); GRPC_COMBINER_UNREF(grpc_combiner_create(), "test_no_op");
} }
static void set_event_to_true(void* value, grpc_error* error) { static void set_event_to_true(void* value, grpc_error* /*error*/) {
gpr_event_set(static_cast<gpr_event*>(value), (void*)1); gpr_event_set(static_cast<gpr_event*>(value), (void*)1);
} }
@ -62,7 +62,7 @@ typedef struct {
size_t value; size_t value;
} ex_args; } ex_args;
static void check_one(void* a, grpc_error* error) { static void check_one(void* a, grpc_error* /*error*/) {
ex_args* args = static_cast<ex_args*>(a); ex_args* args = static_cast<ex_args*>(a);
GPR_ASSERT(*args->ctr == args->value - 1); GPR_ASSERT(*args->ctr == args->value - 1);
*args->ctr = args->value; *args->ctr = args->value;
@ -114,11 +114,11 @@ static void test_execute_many(void) {
static gpr_event got_in_finally; static gpr_event got_in_finally;
static void in_finally(void* arg, grpc_error* error) { static void in_finally(void* /*arg*/, grpc_error* /*error*/) {
gpr_event_set(&got_in_finally, (void*)1); gpr_event_set(&got_in_finally, (void*)1);
} }
static void add_finally(void* arg, grpc_error* error) { static void add_finally(void* arg, grpc_error* /*error*/) {
static_cast<grpc_core::Combiner*>(arg)->Run( static_cast<grpc_core::Combiner*>(arg)->Run(
GRPC_CLOSURE_CREATE(in_finally, arg, nullptr), GRPC_ERROR_NONE); GRPC_CLOSURE_CREATE(in_finally, arg, nullptr), GRPC_ERROR_NONE);
} }

@ -54,7 +54,7 @@ static grpc_endpoint_test_config configs[] = {
{"tcp/tcp_socketpair", create_fixture_endpoint_pair, clean_up}, {"tcp/tcp_socketpair", create_fixture_endpoint_pair, clean_up},
}; };
static void destroy_pollset(void* p, grpc_error* error) { static void destroy_pollset(void* p, grpc_error* /*error*/) {
grpc_pollset_destroy(static_cast<grpc_pollset*>(p)); grpc_pollset_destroy(static_cast<grpc_pollset*>(p));
} }

@ -27,7 +27,7 @@
#include "test/core/util/test_config.h" #include "test/core/util/test_config.h"
static void pollset_destroy(void* ps, grpc_error* error) { static void pollset_destroy(void* ps, grpc_error* /*error*/) {
grpc_pollset_destroy(static_cast<grpc_pollset*>(ps)); grpc_pollset_destroy(static_cast<grpc_pollset*>(ps));
gpr_free(ps); gpr_free(ps);
} }

@ -82,7 +82,7 @@ static void create_test_socket(int port, int* socket_fd,
} }
/* Dummy gRPC callback */ /* Dummy gRPC callback */
void no_op_cb(void* arg, int success) {} void no_op_cb(void* /*arg*/, int /*success*/) {}
/* =======An upload server to test notify_on_read=========== /* =======An upload server to test notify_on_read===========
The server simply reads and counts a stream of bytes. */ The server simply reads and counts a stream of bytes. */
@ -112,7 +112,7 @@ typedef struct {
/* Called when an upload session can be safely shutdown. /* Called when an upload session can be safely shutdown.
Close session FD and start to shutdown listen FD. */ Close session FD and start to shutdown listen FD. */
static void session_shutdown_cb(void* arg, /*session */ static void session_shutdown_cb(void* arg, /*session */
bool success) { bool /*success*/) {
session* se = static_cast<session*>(arg); session* se = static_cast<session*>(arg);
server* sv = se->sv; server* sv = se->sv;
grpc_fd_orphan(se->em_fd, nullptr, nullptr, "a"); grpc_fd_orphan(se->em_fd, nullptr, nullptr, "a");
@ -168,7 +168,7 @@ static void session_read_cb(void* arg, /*session */
/* Called when the listen FD can be safely shutdown. /* Called when the listen FD can be safely shutdown.
Close listen FD and signal that server can be shutdown. */ Close listen FD and signal that server can be shutdown. */
static void listen_shutdown_cb(void* arg /*server */, int success) { static void listen_shutdown_cb(void* arg /*server*/, int /*success*/) {
server* sv = static_cast<server*>(arg); server* sv = static_cast<server*>(arg);
grpc_fd_orphan(sv->em_fd, nullptr, nullptr, "b"); grpc_fd_orphan(sv->em_fd, nullptr, nullptr, "b");
@ -287,7 +287,7 @@ static void client_init(client* cl) {
} }
/* Called when a client upload session is ready to shutdown. */ /* Called when a client upload session is ready to shutdown. */
static void client_session_shutdown_cb(void* arg /*client */, int success) { static void client_session_shutdown_cb(void* arg /*client*/, int /*success*/) {
client* cl = static_cast<client*>(arg); client* cl = static_cast<client*>(arg);
grpc_fd_orphan(cl->em_fd, nullptr, nullptr, "c"); grpc_fd_orphan(cl->em_fd, nullptr, nullptr, "c");
cl->done = 1; cl->done = 1;
@ -401,10 +401,10 @@ typedef struct fd_change_data {
void init_change_data(fd_change_data* fdc) { fdc->cb_that_ran = nullptr; } void init_change_data(fd_change_data* fdc) { fdc->cb_that_ran = nullptr; }
void destroy_change_data(fd_change_data* fdc) {} void destroy_change_data(fd_change_data* /*fdc*/) {}
static void first_read_callback(void* arg /* fd_change_data */, static void first_read_callback(void* arg /* fd_change_data */,
grpc_error* error) { grpc_error* /*error*/) {
fd_change_data* fdc = static_cast<fd_change_data*>(arg); fd_change_data* fdc = static_cast<fd_change_data*>(arg);
gpr_mu_lock(g_mu); gpr_mu_lock(g_mu);
@ -415,7 +415,7 @@ static void first_read_callback(void* arg /* fd_change_data */,
} }
static void second_read_callback(void* arg /* fd_change_data */, static void second_read_callback(void* arg /* fd_change_data */,
grpc_error* error) { grpc_error* /*error*/) {
fd_change_data* fdc = static_cast<fd_change_data*>(arg); fd_change_data* fdc = static_cast<fd_change_data*>(arg);
gpr_mu_lock(g_mu); gpr_mu_lock(g_mu);
@ -509,7 +509,7 @@ static void test_grpc_fd_change(void) {
close(sv[1]); close(sv[1]);
} }
static void destroy_pollset(void* p, grpc_error* error) { static void destroy_pollset(void* p, grpc_error* /*error*/) {
grpc_pollset_destroy(static_cast<grpc_pollset*>(p)); grpc_pollset_destroy(static_cast<grpc_pollset*>(p));
} }

@ -53,7 +53,7 @@ typedef struct args_struct {
grpc_pollset_set* pollset_set; grpc_pollset_set* pollset_set;
} args_struct; } args_struct;
static void do_nothing(void* arg, grpc_error* error) {} static void do_nothing(void* /*arg*/, grpc_error* /*error*/) {}
void args_init(args_struct* args) { void args_init(args_struct* args) {
gpr_event_init(&args->ev); gpr_event_init(&args->ev);

@ -47,7 +47,7 @@ typedef struct args_struct {
grpc_pollset_set* pollset_set; grpc_pollset_set* pollset_set;
} args_struct; } args_struct;
static void do_nothing(void* arg, grpc_error* error) {} static void do_nothing(void* /*arg*/, grpc_error* /*error*/) {}
void args_init(args_struct* args) { void args_init(args_struct* args) {
gpr_event_init(&args->ev); gpr_event_init(&args->ev);
@ -310,7 +310,7 @@ typedef struct mock_ipv6_disabled_source_addr_factory {
} mock_ipv6_disabled_source_addr_factory; } mock_ipv6_disabled_source_addr_factory;
static bool mock_ipv6_disabled_source_addr_factory_get_source_addr( static bool mock_ipv6_disabled_source_addr_factory_get_source_addr(
address_sorting_source_addr_factory* factory, address_sorting_source_addr_factory* /*factory*/,
const address_sorting_address* dest_addr, const address_sorting_address* dest_addr,
address_sorting_address* source_addr) { address_sorting_address* source_addr) {
// Mock lack of IPv6. For IPv4, set the source addr to be the same // Mock lack of IPv6. For IPv4, set the source addr to be the same

@ -28,7 +28,7 @@
gpr_mu g_mu; gpr_mu g_mu;
gpr_cv g_cv; gpr_cv g_cv;
static void inc_int_cb(void* a, grpc_error* error) { static void inc_int_cb(void* a, grpc_error* /*error*/) {
gpr_mu_lock(&g_mu); gpr_mu_lock(&g_mu);
++*static_cast<int*>(a); ++*static_cast<int*>(a);
gpr_cv_signal(&g_cv); gpr_cv_signal(&g_cv);
@ -44,7 +44,7 @@ static void assert_counter_becomes(int* ctr, int value) {
gpr_mu_unlock(&g_mu); gpr_mu_unlock(&g_mu);
} }
static void set_event_cb(void* a, grpc_error* error) { static void set_event_cb(void* a, grpc_error* /*error*/) {
gpr_event_set(static_cast<gpr_event*>(a), (void*)1); gpr_event_set(static_cast<gpr_event*>(a), (void*)1);
} }
grpc_closure* set_event(gpr_event* ev) { grpc_closure* set_event(gpr_event* ev) {

@ -60,7 +60,7 @@ static void finish_connection() {
gpr_mu_unlock(g_mu); gpr_mu_unlock(g_mu);
} }
static void must_succeed(void* arg, grpc_error* error) { static void must_succeed(void* /*arg*/, grpc_error* error) {
GPR_ASSERT(g_connecting != nullptr); GPR_ASSERT(g_connecting != nullptr);
GPR_ASSERT(error == GRPC_ERROR_NONE); GPR_ASSERT(error == GRPC_ERROR_NONE);
grpc_endpoint_shutdown(g_connecting, GRPC_ERROR_CREATE_FROM_STATIC_STRING( grpc_endpoint_shutdown(g_connecting, GRPC_ERROR_CREATE_FROM_STATIC_STRING(
@ -70,7 +70,7 @@ static void must_succeed(void* arg, grpc_error* error) {
finish_connection(); finish_connection();
} }
static void must_fail(void* arg, grpc_error* error) { static void must_fail(void* /*arg*/, grpc_error* error) {
GPR_ASSERT(g_connecting == nullptr); GPR_ASSERT(g_connecting == nullptr);
GPR_ASSERT(error != GRPC_ERROR_NONE); GPR_ASSERT(error != GRPC_ERROR_NONE);
finish_connection(); finish_connection();
@ -185,7 +185,7 @@ void test_fails(void) {
gpr_mu_unlock(g_mu); gpr_mu_unlock(g_mu);
} }
static void destroy_pollset(void* p, grpc_error* error) { static void destroy_pollset(void* p, grpc_error* /*error*/) {
grpc_pollset_destroy(static_cast<grpc_pollset*>(p)); grpc_pollset_destroy(static_cast<grpc_pollset*>(p));
} }

@ -472,7 +472,7 @@ static void write_test(size_t num_bytes, size_t slice_size,
gpr_free(slices); gpr_free(slices);
} }
void on_fd_released(void* arg, grpc_error* errors) { void on_fd_released(void* arg, grpc_error* /*errors*/) {
int* done = static_cast<int*>(arg); int* done = static_cast<int*>(arg);
*done = 1; *done = 1;
GPR_ASSERT( GPR_ASSERT(
@ -618,7 +618,7 @@ static grpc_endpoint_test_config configs[] = {
{"tcp/tcp_socketpair", create_fixture_tcp_socketpair, clean_up}, {"tcp/tcp_socketpair", create_fixture_tcp_socketpair, clean_up},
}; };
static void destroy_pollset(void* p, grpc_error* error) { static void destroy_pollset(void* p, grpc_error* /*error*/) {
grpc_pollset_destroy(static_cast<grpc_pollset*>(p)); grpc_pollset_destroy(static_cast<grpc_pollset*>(p));
} }

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save