Merge pull request #20654 from vjpai/remove_warn_7

Remove unused parameter warnings (7 of 20)
reviewable/pr18856/r15^2
Vijay Pai 5 years ago committed by GitHub
commit 50206e36f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      test/core/end2end/fuzzers/client_fuzzer.cc
  2. 4
      test/core/end2end/fuzzers/server_fuzzer.cc
  3. 7
      test/core/end2end/h2_ssl_cert_test.cc
  4. 6
      test/core/end2end/inproc_callback_test.cc
  5. 2
      test/core/end2end/tests/cancel_test_helpers.h
  6. 2
      test/core/end2end/tests/channelz.cc
  7. 2
      test/core/end2end/tests/connectivity.cc
  8. 22
      test/core/end2end/tests/filter_call_init_fails.cc
  9. 19
      test/core/end2end/tests/filter_causes_close.cc
  10. 12
      test/core/end2end/tests/filter_context.cc

@ -33,11 +33,11 @@
bool squelch = 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 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) {
grpc_test_only_set_slice_hash_seed(0);

@ -29,12 +29,12 @@
bool squelch = 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 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) {
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(
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;
int port = grpc_pick_unused_port_or_die();
fullstack_secure_fixture_data* ffd =
@ -59,8 +59,9 @@ static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack(
return f;
}
static void process_auth_failure(void* state, grpc_auth_context* ctx,
const grpc_metadata* md, size_t md_count,
static void process_auth_failure(void* state, grpc_auth_context* /*ctx*/,
const grpc_metadata* /*md*/,
size_t /*md_count*/,
grpc_process_auth_metadata_done_cb cb,
void* user_data) {
GPR_ASSERT(state == nullptr);

@ -74,7 +74,7 @@ class ShutdownCallback : public grpc_experimental_completion_queue_functor {
auto* callback = static_cast<ShutdownCallback*>(cb);
callback->Run(static_cast<bool>(ok));
}
void Run(bool ok) {
void Run(bool /*ok*/) {
gpr_log(GPR_DEBUG, "CQ shutdown notification invoked");
gpr_mu_lock(&mu_);
done_ = true;
@ -205,7 +205,7 @@ static grpc_experimental_completion_queue_functor* tag(intptr_t t) {
}
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;
inproc_fixture_data* ffd = static_cast<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 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
GPR_ASSERT(g_shutdown_callback->Wait(five_seconds_from_now()));
gpr_log(GPR_DEBUG, "CQ shutdown wait complete");

@ -26,7 +26,7 @@ typedef struct {
const char* expect_details;
} 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;
return GRPC_CALL_OK;
}

@ -89,7 +89,7 @@ static void end_test(grpc_end2end_test_fixture* f) {
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,
bool request_is_success) {
grpc_call* c;

@ -186,7 +186,7 @@ static void cb_watch_connectivity(
}
static void cb_shutdown(grpc_experimental_completion_queue_functor* functor,
int success) {
int /*success*/) {
CallbackContext* cb_ctx = (CallbackContext*)functor;
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
*/
static grpc_error* init_call_elem(grpc_call_element* elem,
const grpc_call_element_args* args) {
static grpc_error* init_call_elem(grpc_call_element* /*elem*/,
const grpc_call_element_args* /*args*/) {
return grpc_error_set_int(
GRPC_ERROR_CREATE_FROM_STATIC_STRING("access denied"),
GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_PERMISSION_DENIED);
}
static void destroy_call_elem(grpc_call_element* elem,
const grpc_call_final_info* final_info,
grpc_closure* ignored) {}
static void destroy_call_elem(grpc_call_element* /*elem*/,
const grpc_call_final_info* /*final_info*/,
grpc_closure* /*ignored*/) {}
static grpc_error* init_channel_elem(grpc_channel_element* elem,
grpc_channel_element_args* args) {
static grpc_error* init_channel_elem(grpc_channel_element* /*elem*/,
grpc_channel_element_args* /*args*/) {
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 = {
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,
void* arg) {
void* /*arg*/) {
if (g_enable_server_channel_filter) {
// 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
@ -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,
void* arg) {
void* /*arg*/) {
if (g_enable_client_channel_filter) {
// 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
@ -468,7 +468,7 @@ static bool maybe_add_client_channel_filter(grpc_channel_stack_builder* builder,
}
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) {
// 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

@ -218,21 +218,21 @@ static void start_transport_stream_op_batch(
grpc_call_next_op(elem, op);
}
static grpc_error* init_call_elem(grpc_call_element* elem,
const grpc_call_element_args* args) {
static grpc_error* init_call_elem(grpc_call_element* /*elem*/,
const grpc_call_element_args* /*args*/) {
return GRPC_ERROR_NONE;
}
static void destroy_call_elem(grpc_call_element* elem,
const grpc_call_final_info* final_info,
grpc_closure* ignored) {}
static void destroy_call_elem(grpc_call_element* /*elem*/,
const grpc_call_final_info* /*final_info*/,
grpc_closure* /*ignored*/) {}
static grpc_error* init_channel_elem(grpc_channel_element* elem,
grpc_channel_element_args* args) {
static grpc_error* init_channel_elem(grpc_channel_element* /*elem*/,
grpc_channel_element_args* /*args*/) {
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 = {
start_transport_stream_op_batch,
@ -251,7 +251,8 @@ static const grpc_channel_filter test_filter = {
* 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) {
return grpc_channel_stack_builder_prepend_filter(builder, &test_filter,
nullptr, nullptr);

@ -247,16 +247,16 @@ static void start_transport_stream_op_batch(
grpc_call_next_op(elem, batch);
}
static void destroy_call_elem(grpc_call_element* elem,
const grpc_call_final_info* final_info,
grpc_closure* ignored) {}
static void destroy_call_elem(grpc_call_element* /*elem*/,
const grpc_call_final_info* /*final_info*/,
grpc_closure* /*ignored*/) {}
static grpc_error* init_channel_elem(grpc_channel_element* elem,
grpc_channel_element_args* args) {
static grpc_error* init_channel_elem(grpc_channel_element* /*elem*/,
grpc_channel_element_args* /*args*/) {
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 = {
start_transport_stream_op_batch,

Loading…
Cancel
Save