Merge pull request #20651 from vjpai/remove_warn_10

Remove unused parameter warnings (10 of 20)
reviewable/pr18856/r15^2
Vijay Pai 5 years ago committed by GitHub
commit 9de9c65855
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      test/core/iomgr/combiner_test.cc
  2. 2
      test/core/iomgr/endpoint_pair_test.cc
  3. 2
      test/core/iomgr/ev_epollex_linux_test.cc
  4. 16
      test/core/iomgr/fd_posix_test.cc
  5. 2
      test/core/iomgr/resolve_address_posix_test.cc
  6. 4
      test/core/iomgr/resolve_address_test.cc
  7. 4
      test/core/iomgr/resource_quota_test.cc
  8. 6
      test/core/iomgr/tcp_client_posix_test.cc
  9. 4
      test/core/iomgr/tcp_posix_test.cc
  10. 7
      test/core/iomgr/tcp_server_posix_test.cc

@ -32,7 +32,7 @@ static void test_no_op(void) {
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);
}
@ -63,7 +63,7 @@ typedef struct {
size_t value;
} 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);
GPR_ASSERT(*args->ctr == args->value - 1);
*args->ctr = args->value;
@ -117,11 +117,11 @@ static void test_execute_many(void) {
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);
}
static void add_finally(void* arg, grpc_error* error) {
static void add_finally(void* arg, grpc_error* /*error*/) {
GRPC_CLOSURE_SCHED(GRPC_CLOSURE_CREATE(in_finally, arg,
grpc_combiner_finally_scheduler(
static_cast<grpc_combiner*>(arg))),

@ -54,7 +54,7 @@ static grpc_endpoint_test_config configs[] = {
{"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));
}

@ -27,7 +27,7 @@
#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));
gpr_free(ps);
}

@ -82,7 +82,7 @@ static void create_test_socket(int port, int* socket_fd,
}
/* 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===========
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.
Close session FD and start to shutdown listen FD. */
static void session_shutdown_cb(void* arg, /*session */
bool success) {
bool /*success*/) {
session* se = static_cast<session*>(arg);
server* sv = se->sv;
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.
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);
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. */
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);
grpc_fd_orphan(cl->em_fd, nullptr, nullptr, "c");
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 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 */,
grpc_error* error) {
grpc_error* /*error*/) {
fd_change_data* fdc = static_cast<fd_change_data*>(arg);
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 */,
grpc_error* error) {
grpc_error* /*error*/) {
fd_change_data* fdc = static_cast<fd_change_data*>(arg);
gpr_mu_lock(g_mu);
@ -509,7 +509,7 @@ static void test_grpc_fd_change(void) {
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));
}

@ -53,7 +53,7 @@ typedef struct args_struct {
grpc_pollset_set* pollset_set;
} 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) {
gpr_event_init(&args->ev);

@ -47,7 +47,7 @@ typedef struct args_struct {
grpc_pollset_set* pollset_set;
} 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) {
gpr_event_init(&args->ev);
@ -310,7 +310,7 @@ typedef struct mock_ipv6_disabled_source_addr_factory {
} mock_ipv6_disabled_source_addr_factory;
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,
address_sorting_address* source_addr) {
// Mock lack of IPv6. For IPv4, set the source addr to be the same

@ -28,7 +28,7 @@
gpr_mu g_mu;
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);
++*static_cast<int*>(a);
gpr_cv_signal(&g_cv);
@ -44,7 +44,7 @@ static void assert_counter_becomes(int* ctr, int value) {
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);
}
grpc_closure* set_event(gpr_event* ev) {

@ -60,7 +60,7 @@ static void finish_connection() {
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(error == GRPC_ERROR_NONE);
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();
}
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(error != GRPC_ERROR_NONE);
finish_connection();
@ -185,7 +185,7 @@ void test_fails(void) {
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));
}

@ -472,7 +472,7 @@ static void write_test(size_t num_bytes, size_t slice_size,
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);
*done = 1;
GPR_ASSERT(
@ -618,7 +618,7 @@ static grpc_endpoint_test_config configs[] = {
{"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));
}

@ -110,7 +110,7 @@ static void on_connect_result_set(on_connect_result* result,
result->server, acceptor->port_index, acceptor->fd_index);
}
static void server_weak_ref_shutdown(void* arg, grpc_error* error) {
static void server_weak_ref_shutdown(void* arg, grpc_error* /*error*/) {
server_weak_ref* weak_ref = static_cast<server_weak_ref*>(arg);
weak_ref->server = nullptr;
}
@ -144,7 +144,8 @@ static void test_addr_init_str(test_addr* addr) {
}
}
static void on_connect(void* arg, grpc_endpoint* tcp, grpc_pollset* pollset,
static void on_connect(void* /*arg*/, grpc_endpoint* tcp,
grpc_pollset* /*pollset*/,
grpc_tcp_server_acceptor* acceptor) {
grpc_endpoint_shutdown(tcp,
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Connected"));
@ -421,7 +422,7 @@ static void test_connect(size_t num_connects,
GPR_ASSERT(weak_ref.server == nullptr);
}
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));
}

Loading…
Cancel
Save