Merge pull request #20641 from vjpai/remove_warn_20

Remove unused parameter warnings (20 of 20)
pull/20645/head^2
Vijay Pai 5 years ago committed by GitHub
commit ac4631949d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      test/cpp/qps/worker.cc
  2. 2
      test/cpp/server/server_builder_with_socket_mutator_test.cc
  3. 2
      test/cpp/thread_manager/thread_manager_test.cc
  4. 2
      test/cpp/util/grpc_tool.cc
  5. 4
      test/cpp/util/metrics_server.cc
  6. 4
      test/cpp/util/slice_test.cc

@ -37,7 +37,7 @@ DEFINE_string(credential_type, grpc::testing::kInsecureCredentialsType,
static bool got_sigint = false;
static void sigint_handler(int x) { got_sigint = true; }
static void sigint_handler(int /*x*/) { got_sigint = true; }
namespace grpc {
namespace testing {

@ -55,7 +55,7 @@ class MockSocketMutator : public grpc_socket_mutator {
int mutate_fd_call_count_;
};
bool mock_socket_mutator_mutate_fd(int fd, grpc_socket_mutator* m) {
bool mock_socket_mutator_mutate_fd(int /*fd*/, grpc_socket_mutator* m) {
MockSocketMutator* s = reinterpret_cast<MockSocketMutator*>(m);
s->mutate_fd_call_count_++;
return true;

@ -102,7 +102,7 @@ grpc::ThreadManager::WorkStatus ThreadManagerTest::PollForWork(void** tag,
return WORK_FOUND;
}
void ThreadManagerTest::DoWork(void* tag, bool ok, bool resources) {
void ThreadManagerTest::DoWork(void* /*tag*/, bool /*ok*/, bool /*resources*/) {
gpr_atm_no_barrier_fetch_add(&num_do_work_, 1);
SleepForMs(settings_.work_duration_ms); // Simulate work by sleeping
}

@ -427,7 +427,7 @@ bool GrpcTool::ListServices(int argc, const char** argv,
return callback(output);
}
bool GrpcTool::PrintType(int argc, const char** argv,
bool GrpcTool::PrintType(int /*argc*/, const char** argv,
const CliCredentials& cred,
GrpcToolOutputCallback callback) {
CommandUsage(

@ -51,7 +51,7 @@ long QpsGauge::Get() {
}
grpc::Status MetricsServiceImpl::GetAllGauges(
ServerContext* context, const EmptyMessage* request,
ServerContext* /*context*/, const EmptyMessage* /*request*/,
ServerWriter<GaugeResponse>* writer) {
gpr_log(GPR_DEBUG, "GetAllGauges called");
@ -66,7 +66,7 @@ grpc::Status MetricsServiceImpl::GetAllGauges(
return Status::OK;
}
grpc::Status MetricsServiceImpl::GetGauge(ServerContext* context,
grpc::Status MetricsServiceImpl::GetGauge(ServerContext* /*context*/,
const GaugeRequest* request,
GaugeResponse* response) {
std::lock_guard<std::mutex> lock(mu_);

@ -80,7 +80,7 @@ TEST_F(SliceTest, SliceNew) {
}
TEST_F(SliceTest, SliceNewDoNothing) {
Slice spp(const_cast<char*>(kContent), strlen(kContent), [](void* p) {});
Slice spp(const_cast<char*>(kContent), strlen(kContent), [](void* /*p*/) {});
CheckSlice(spp, kContent);
}
@ -104,7 +104,7 @@ TEST_F(SliceTest, SliceNewWithUserData) {
TEST_F(SliceTest, SliceNewLen) {
Slice spp(const_cast<char*>(kContent), strlen(kContent),
[](void* p, size_t l) { EXPECT_EQ(l, strlen(kContent)); });
[](void* /*p*/, size_t l) { EXPECT_EQ(l, strlen(kContent)); });
CheckSlice(spp, kContent);
}

Loading…
Cancel
Save