Merge pull request #20648 from vjpai/remove_warn_13
Remove unused parameter warnings (13 of 20)
This commit is contained in:
commit
dca4f8a698
|
|
@ -87,7 +87,7 @@ static size_t base64_infer_length(const char* s) {
|
|||
EXPECT_SLICE_EQ( \
|
||||
s, grpc_chttp2_base64_decode_with_length(base64_encode(s), strlen(s)));
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
int main(int /*argc*/, char** /*argv*/) {
|
||||
grpc_init();
|
||||
{
|
||||
grpc_core::ExecCtx exec_ctx;
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ void TestExecuteFlushesListVerifier(void* arg, grpc_core::Timestamps* ts,
|
|||
gpr_atm_rel_store(done, static_cast<gpr_atm>(1));
|
||||
}
|
||||
|
||||
void discard_write(grpc_slice slice) {}
|
||||
void discard_write(grpc_slice /*slice*/) {}
|
||||
|
||||
class ContextListTest : public ::testing::Test {
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -30,11 +30,11 @@
|
|||
bool squelch = true;
|
||||
bool leak_check = true;
|
||||
|
||||
static grpc_error* onhdr(void* ud, grpc_mdelem md) {
|
||||
static grpc_error* onhdr(void* /*ud*/, grpc_mdelem md) {
|
||||
GRPC_MDELEM_UNREF(md);
|
||||
return GRPC_ERROR_NONE;
|
||||
}
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
#define LOG_TEST(x) gpr_log(GPR_INFO, "%s", x)
|
||||
|
||||
static void assert_str(const grpc_chttp2_hptbl* tbl, grpc_slice mdstr,
|
||||
static void assert_str(const grpc_chttp2_hptbl* /*tbl*/, grpc_slice mdstr,
|
||||
const char* str) {
|
||||
GPR_ASSERT(grpc_slice_str_cmp(mdstr, str) == 0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ class Client {
|
|||
}
|
||||
}
|
||||
|
||||
static void PollsetDestroy(void* arg, grpc_error* error) {
|
||||
static void PollsetDestroy(void* arg, grpc_error* /*error*/) {
|
||||
grpc_pollset* pollset = static_cast<grpc_pollset*>(arg);
|
||||
grpc_pollset_destroy(pollset);
|
||||
gpr_free(pollset);
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#include <grpc/grpc.h>
|
||||
#include <grpc/support/log.h>
|
||||
|
||||
static void do_nothing(void* arg, grpc_error* error) {}
|
||||
static void do_nothing(void* /*arg*/, grpc_error* /*error*/) {}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
grpc::testing::TestEnvironment env(argc, argv);
|
||||
|
|
|
|||
|
|
@ -386,7 +386,7 @@ static void alts_test_do_round_trip_all(bool rekey) {
|
|||
gpr_free(bit_array);
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
int main(int /*argc*/, char** /*argv*/) {
|
||||
alts_test_do_round_trip_vector_tests();
|
||||
alts_test_do_round_trip_all(/*rekey=*/false);
|
||||
alts_test_do_round_trip_all(/*rekey=*/true);
|
||||
|
|
|
|||
|
|
@ -134,9 +134,10 @@ static grpc_gcp_HandshakerReq* deserialize_handshaker_req(
|
|||
* A mock grpc_caller used to check if client_start, server_start, and next
|
||||
* operations correctly handle invalid arguments. It should not be called.
|
||||
*/
|
||||
static grpc_call_error check_must_not_be_called(grpc_call* call,
|
||||
const grpc_op* ops, size_t nops,
|
||||
grpc_closure* tag) {
|
||||
static grpc_call_error check_must_not_be_called(grpc_call* /*call*/,
|
||||
const grpc_op* /*ops*/,
|
||||
size_t /*nops*/,
|
||||
grpc_closure* /*tag*/) {
|
||||
GPR_ASSERT(0);
|
||||
}
|
||||
|
||||
|
|
@ -146,7 +147,7 @@ static grpc_call_error check_must_not_be_called(grpc_call* call,
|
|||
* handshake_security_protocol, application_protocol, and record_protocol, and
|
||||
* op is correctly populated.
|
||||
*/
|
||||
static grpc_call_error check_client_start_success(grpc_call* call,
|
||||
static grpc_call_error check_client_start_success(grpc_call* /*call*/,
|
||||
const grpc_op* op,
|
||||
size_t nops,
|
||||
grpc_closure* closure) {
|
||||
|
|
@ -191,7 +192,7 @@ static grpc_call_error check_client_start_success(grpc_call* call,
|
|||
* handshake_security_protocol, application_protocol, and record_protocol, and
|
||||
* op is correctly populated.
|
||||
*/
|
||||
static grpc_call_error check_server_start_success(grpc_call* call,
|
||||
static grpc_call_error check_server_start_success(grpc_call* /*call*/,
|
||||
const grpc_op* op,
|
||||
size_t nops,
|
||||
grpc_closure* closure) {
|
||||
|
|
@ -234,8 +235,9 @@ static grpc_call_error check_server_start_success(grpc_call* call,
|
|||
* checks if the next handshaker request is populated with correct information,
|
||||
* and op is correctly populated.
|
||||
*/
|
||||
static grpc_call_error check_next_success(grpc_call* call, const grpc_op* op,
|
||||
size_t nops, grpc_closure* closure) {
|
||||
static grpc_call_error check_next_success(grpc_call* /*call*/,
|
||||
const grpc_op* op, size_t nops,
|
||||
grpc_closure* closure) {
|
||||
upb::Arena arena;
|
||||
alts_handshaker_client* client =
|
||||
static_cast<alts_handshaker_client*>(closure->cb_arg);
|
||||
|
|
@ -256,9 +258,10 @@ static grpc_call_error check_next_success(grpc_call* call, const grpc_op* op,
|
|||
* operations correctly handle the situation when the grpc call made to the
|
||||
* handshaker service fails.
|
||||
*/
|
||||
static grpc_call_error check_grpc_call_failure(grpc_call* call,
|
||||
const grpc_op* op, size_t nops,
|
||||
grpc_closure* tag) {
|
||||
static grpc_call_error check_grpc_call_failure(grpc_call* /*call*/,
|
||||
const grpc_op* /*op*/,
|
||||
size_t /*nops*/,
|
||||
grpc_closure* /*tag*/) {
|
||||
return GRPC_CALL_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -397,7 +400,7 @@ static void schedule_request_grpc_call_failure_test() {
|
|||
destroy_config(config);
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
int main(int /*argc*/, char** /*argv*/) {
|
||||
/* Initialization. */
|
||||
grpc_init();
|
||||
grpc_alts_shared_resource_dedicated_init();
|
||||
|
|
|
|||
|
|
@ -181,10 +181,10 @@ static grpc_byte_buffer* generate_handshaker_response(
|
|||
return buffer;
|
||||
}
|
||||
|
||||
static void check_must_not_be_called(tsi_result status, void* user_data,
|
||||
const unsigned char* bytes_to_send,
|
||||
size_t bytes_to_send_size,
|
||||
tsi_handshaker_result* result) {
|
||||
static void check_must_not_be_called(tsi_result /*status*/, void* /*user_data*/,
|
||||
const unsigned char* /*bytes_to_send*/,
|
||||
size_t /*bytes_to_send_size*/,
|
||||
tsi_handshaker_result* /*result*/) {
|
||||
GPR_ASSERT(0);
|
||||
}
|
||||
|
||||
|
|
@ -331,7 +331,7 @@ static tsi_result mock_client_start(alts_handshaker_client* client) {
|
|||
return TSI_OK;
|
||||
}
|
||||
|
||||
static void mock_shutdown(alts_handshaker_client* self) {}
|
||||
static void mock_shutdown(alts_handshaker_client* /*self*/) {}
|
||||
|
||||
static tsi_result mock_server_start(alts_handshaker_client* client,
|
||||
grpc_slice* bytes_received) {
|
||||
|
|
@ -384,7 +384,7 @@ static tsi_result mock_next(alts_handshaker_client* client,
|
|||
return TSI_OK;
|
||||
}
|
||||
|
||||
static void mock_destruct(alts_handshaker_client* client) {}
|
||||
static void mock_destruct(alts_handshaker_client* /*client*/) {}
|
||||
|
||||
static alts_handshaker_client_vtable vtable = {mock_client_start,
|
||||
mock_server_start, mock_next,
|
||||
|
|
@ -484,7 +484,7 @@ static void check_handshaker_next_with_shutdown() {
|
|||
tsi_handshaker_destroy(handshaker);
|
||||
}
|
||||
|
||||
static void check_handle_response_with_shutdown(void* unused) {
|
||||
static void check_handle_response_with_shutdown(void* /*unused*/) {
|
||||
wait(&caller_to_tsi_notification);
|
||||
alts_handshaker_client_handle_response(cb_event, true /* is_ok */);
|
||||
}
|
||||
|
|
@ -627,7 +627,7 @@ static void check_handle_response_invalid_resp() {
|
|||
notification_destroy(&tsi_to_caller_notification);
|
||||
}
|
||||
|
||||
static void check_handle_response_success(void* unused) {
|
||||
static void check_handle_response_success(void* /*unused*/) {
|
||||
/* Client start. */
|
||||
wait(&caller_to_tsi_notification);
|
||||
alts_handshaker_client_handle_response(cb_event, true /* is_ok */);
|
||||
|
|
@ -750,7 +750,7 @@ void check_handshaker_success() {
|
|||
notification_destroy(&tsi_to_caller_notification);
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
int main(int /*argc*/, char** /*argv*/) {
|
||||
/* Initialization. */
|
||||
grpc_init();
|
||||
grpc_alts_shared_resource_dedicated_init();
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ static void deserialize_response_test() {
|
|||
grpc_byte_buffer_destroy(buffer);
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
int main(int /*argc*/, char** /*argv*/) {
|
||||
/* Tests. */
|
||||
deserialize_response_test();
|
||||
convert_to_tsi_result_test();
|
||||
|
|
|
|||
Loading…
Reference in New Issue