Remove unused parameter warning (19 of 20)

pull/20642/head
Vijay Pai 5 years ago
parent a0ad4081cb
commit 37d248abd0
  1. 2
      test/cpp/naming/resolver_component_tests_runner_invoker.cc
  2. 16
      test/cpp/qps/client_async.cc
  3. 12
      test/cpp/qps/client_callback.cc
  4. 5
      test/cpp/qps/client_sync.cc
  5. 2
      test/cpp/qps/json_run_localhost.cc
  6. 8
      test/cpp/qps/qps_worker.cc
  7. 24
      test/cpp/qps/report.cc
  8. 6
      test/cpp/qps/server_async.cc
  9. 7
      test/cpp/qps/server_callback.cc
  10. 8
      test/cpp/qps/server_sync.cc

@ -59,7 +59,7 @@ using grpc::SubProcess;
static volatile sig_atomic_t abort_wait_for_child = 0;
static void sighandler(int sig) { abort_wait_for_child = 1; }
static void sighandler(int /*sig*/) { abort_wait_for_child = 1; }
static void register_sighandler() {
struct sigaction act;

@ -86,7 +86,7 @@ class ClientRpcContextUnaryImpl : public ClientRpcContext {
GPR_ASSERT(!config.use_coalesce_api()); // not supported.
StartInternal(cq);
}
bool RunNextState(bool ok, HistogramEntry* entry) override {
bool RunNextState(bool /*ok*/, HistogramEntry* entry) override {
switch (next_state_) {
case State::READY:
start_ = UsageTimer::Now();
@ -314,7 +314,7 @@ class AsyncUnaryClient final
~AsyncUnaryClient() override {}
private:
static void CheckDone(const grpc::Status& s, SimpleResponse* response,
static void CheckDone(const grpc::Status& s, SimpleResponse* /*response*/,
HistogramEntry* entry) {
entry->set_status(s.error_code());
}
@ -498,7 +498,8 @@ class AsyncStreamingPingPongClient final
~AsyncStreamingPingPongClient() override {}
private:
static void CheckDone(const grpc::Status& s, SimpleResponse* response) {}
static void CheckDone(const grpc::Status& /*s*/,
SimpleResponse* /*response*/) {}
static std::unique_ptr<
grpc::ClientAsyncReaderWriter<SimpleRequest, SimpleResponse>>
PrepareReq(BenchmarkService::Stub* stub, grpc::ClientContext* ctx,
@ -630,7 +631,8 @@ class AsyncStreamingFromClientClient final
~AsyncStreamingFromClientClient() override {}
private:
static void CheckDone(const grpc::Status& s, SimpleResponse* response) {}
static void CheckDone(const grpc::Status& /*s*/,
SimpleResponse* /*response*/) {}
static std::unique_ptr<grpc::ClientAsyncWriter<SimpleRequest>> PrepareReq(
BenchmarkService::Stub* stub, grpc::ClientContext* ctx,
SimpleResponse* resp, CompletionQueue* cq) {
@ -745,7 +747,8 @@ class AsyncStreamingFromServerClient final
~AsyncStreamingFromServerClient() override {}
private:
static void CheckDone(const grpc::Status& s, SimpleResponse* response) {}
static void CheckDone(const grpc::Status& /*s*/,
SimpleResponse* /*response*/) {}
static std::unique_ptr<grpc::ClientAsyncReader<SimpleResponse>> PrepareReq(
BenchmarkService::Stub* stub, grpc::ClientContext* ctx,
const SimpleRequest& req, CompletionQueue* cq) {
@ -911,7 +914,8 @@ class GenericAsyncStreamingClient final
~GenericAsyncStreamingClient() override {}
private:
static void CheckDone(const grpc::Status& s, ByteBuffer* response) {}
static void CheckDone(const grpc::Status& /*s*/,
ByteBuffer* /*response*/) {}
static std::unique_ptr<grpc::GenericClientAsyncReaderWriter> PrepareReq(
grpc::GenericStub* stub, grpc::ClientContext* ctx,
const grpc::string& method_name, CompletionQueue* cq) {

@ -162,7 +162,7 @@ class CallbackUnaryClient final : public CallbackClient {
return true;
}
void InitThreadFuncImpl(size_t thread_idx) override { return; }
void InitThreadFuncImpl(size_t /*thread_idx*/) override { return; }
private:
void ScheduleRpc(Thread* t, size_t vector_idx) {
@ -174,7 +174,7 @@ class CallbackUnaryClient final : public CallbackClient {
ctx_[vector_idx]->alarm_.reset(new Alarm);
}
ctx_[vector_idx]->alarm_->experimental().Set(
next_issue_time, [this, t, vector_idx](bool ok) {
next_issue_time, [this, t, vector_idx](bool /*ok*/) {
IssueUnaryCallbackRpc(t, vector_idx);
});
} else {
@ -293,7 +293,7 @@ class CallbackStreamingPingPongReactor final
gpr_timespec next_issue_time = client_->NextRPCIssueTime();
// Start an alarm callback to run the internal callback after
// next_issue_time
ctx_->alarm_->experimental().Set(next_issue_time, [this](bool ok) {
ctx_->alarm_->experimental().Set(next_issue_time, [this](bool /*ok*/) {
write_time_ = UsageTimer::Now();
StartWrite(client_->request());
});
@ -320,8 +320,8 @@ class CallbackStreamingPingPongReactor final
if (ctx_->alarm_ == nullptr) {
ctx_->alarm_.reset(new Alarm);
}
ctx_->alarm_->experimental().Set(next_issue_time,
[this](bool ok) { StartNewRpc(); });
ctx_->alarm_->experimental().Set(
next_issue_time, [this](bool /*ok*/) { StartNewRpc(); });
} else {
StartNewRpc();
}
@ -357,7 +357,7 @@ class CallbackStreamingPingPongClientImpl final
return true;
}
void InitThreadFuncImpl(size_t thread_idx) override {}
void InitThreadFuncImpl(size_t /*thread_idx*/) override {}
private:
std::vector<std::unique_ptr<CallbackStreamingPingPongReactor>> reactor_;

@ -117,7 +117,7 @@ class SynchronousUnaryClient final : public SynchronousClient {
}
~SynchronousUnaryClient() {}
bool InitThreadFuncImpl(size_t thread_idx) override { return true; }
bool InitThreadFuncImpl(size_t /*thread_idx*/) override { return true; }
bool ThreadFuncImpl(HistogramEntry* entry, size_t thread_idx) override {
if (!WaitToIssue(thread_idx)) {
@ -394,7 +394,8 @@ class SynchronousStreamingBothWaysClient final
return true;
}
bool ThreadFuncImpl(HistogramEntry* entry, size_t thread_idx) override {
bool ThreadFuncImpl(HistogramEntry* /*entry*/,
size_t /*thread_idx*/) override {
// TODO (vjpai): Do this
return true;
}

@ -48,7 +48,7 @@ std::string as_string(const T& val) {
return out.str();
}
static void sighandler(int sig) {
static void sighandler(int /*sig*/) {
const int errno_saved = errno;
if (g_driver != nullptr) g_driver->Interrupt();
for (int i = 0; i < kNumWorkers; ++i) {

@ -133,13 +133,13 @@ class WorkerServiceImpl final : public WorkerService::Service {
return ret;
}
Status CoreCount(ServerContext* ctx, const CoreRequest*,
Status CoreCount(ServerContext* /*ctx*/, const CoreRequest*,
CoreResponse* resp) override {
resp->set_cores(gpr_cpu_num_cores());
return Status::OK;
}
Status QuitWorker(ServerContext* ctx, const Void*, Void*) override {
Status QuitWorker(ServerContext* /*ctx*/, const Void*, Void*) override {
InstanceGuard g(this);
if (!g.Acquired()) {
return Status(StatusCode::RESOURCE_EXHAUSTED, "Quitting worker busy");
@ -181,7 +181,7 @@ class WorkerServiceImpl final : public WorkerService::Service {
acquired_ = false;
}
Status RunClientBody(ServerContext* ctx,
Status RunClientBody(ServerContext* /*ctx*/,
ServerReaderWriter<ClientStatus, ClientArgs>* stream) {
ClientArgs args;
if (!stream->Read(&args)) {
@ -221,7 +221,7 @@ class WorkerServiceImpl final : public WorkerService::Service {
return Status::OK;
}
Status RunServerBody(ServerContext* ctx,
Status RunServerBody(ServerContext* /*ctx*/,
ServerReaderWriter<ServerStatus, ServerArgs>* stream) {
ServerArgs args;
if (!stream->Read(&args)) {

@ -171,27 +171,27 @@ void JsonReporter::ReportQPS(const ScenarioResult& result) {
output_file.close();
}
void JsonReporter::ReportQPSPerCore(const ScenarioResult& result) {
void JsonReporter::ReportQPSPerCore(const ScenarioResult& /*result*/) {
// NOP - all reporting is handled by ReportQPS.
}
void JsonReporter::ReportLatency(const ScenarioResult& result) {
void JsonReporter::ReportLatency(const ScenarioResult& /*result*/) {
// NOP - all reporting is handled by ReportQPS.
}
void JsonReporter::ReportTimes(const ScenarioResult& result) {
void JsonReporter::ReportTimes(const ScenarioResult& /*result*/) {
// NOP - all reporting is handled by ReportQPS.
}
void JsonReporter::ReportCpuUsage(const ScenarioResult& result) {
void JsonReporter::ReportCpuUsage(const ScenarioResult& /*result*/) {
// NOP - all reporting is handled by ReportQPS.
}
void JsonReporter::ReportPollCount(const ScenarioResult& result) {
void JsonReporter::ReportPollCount(const ScenarioResult& /*result*/) {
// NOP - all reporting is handled by ReportQPS.
}
void JsonReporter::ReportQueriesPerCpuSec(const ScenarioResult& result) {
void JsonReporter::ReportQueriesPerCpuSec(const ScenarioResult& /*result*/) {
// NOP - all reporting is handled by ReportQPS.
}
@ -211,27 +211,27 @@ void RpcReporter::ReportQPS(const ScenarioResult& result) {
}
}
void RpcReporter::ReportQPSPerCore(const ScenarioResult& result) {
void RpcReporter::ReportQPSPerCore(const ScenarioResult& /*result*/) {
// NOP - all reporting is handled by ReportQPS.
}
void RpcReporter::ReportLatency(const ScenarioResult& result) {
void RpcReporter::ReportLatency(const ScenarioResult& /*result*/) {
// NOP - all reporting is handled by ReportQPS.
}
void RpcReporter::ReportTimes(const ScenarioResult& result) {
void RpcReporter::ReportTimes(const ScenarioResult& /*result*/) {
// NOP - all reporting is handled by ReportQPS.
}
void RpcReporter::ReportCpuUsage(const ScenarioResult& result) {
void RpcReporter::ReportCpuUsage(const ScenarioResult& /*result*/) {
// NOP - all reporting is handled by ReportQPS.
}
void RpcReporter::ReportPollCount(const ScenarioResult& result) {
void RpcReporter::ReportPollCount(const ScenarioResult& /*result*/) {
// NOP - all reporting is handled by ReportQPS.
}
void RpcReporter::ReportQueriesPerCpuSec(const ScenarioResult& result) {
void RpcReporter::ReportQueriesPerCpuSec(const ScenarioResult& /*result*/) {
// NOP - all reporting is handled by ReportQPS.
}

@ -365,7 +365,7 @@ class AsyncQpsServerTest final : public grpc::testing::Server {
}
return true;
}
bool finish_done(bool ok) { return false; /* reset the context */ }
bool finish_done(bool /*ok*/) { return false; /*reset the context*/ }
std::unique_ptr<ServerContextType> srv_ctx_;
RequestType req_;
@ -434,7 +434,7 @@ class AsyncQpsServerTest final : public grpc::testing::Server {
}
return true;
}
bool finish_done(bool ok) { return false; /* reset the context */ }
bool finish_done(bool /*ok*/) { return false; /*reset the context*/ }
std::unique_ptr<ServerContextType> srv_ctx_;
RequestType req_;
@ -502,7 +502,7 @@ class AsyncQpsServerTest final : public grpc::testing::Server {
}
return true;
}
bool finish_done(bool ok) { return false; /* reset the context */ }
bool finish_done(bool /*ok*/) { return false; /*reset the context*/ }
std::unique_ptr<ServerContextType> srv_ctx_;
RequestType req_;

@ -34,7 +34,8 @@ class BenchmarkCallbackServiceImpl final
: public BenchmarkService::ExperimentalCallbackService {
public:
void UnaryCall(
ServerContext* context, const ::grpc::testing::SimpleRequest* request,
ServerContext* /*context*/,
const ::grpc::testing::SimpleRequest* request,
::grpc::testing::SimpleResponse* response,
::grpc::experimental::ServerCallbackRpcController* controller) override {
auto s = SetResponse(request, response);
@ -49,7 +50,9 @@ class BenchmarkCallbackServiceImpl final
::grpc::testing::SimpleRequest, ::grpc::testing::SimpleResponse> {
public:
Reactor() {}
void OnStarted(ServerContext* context) override { StartRead(&request_); }
void OnStarted(ServerContext* /*context*/) override {
StartRead(&request_);
}
void OnReadDone(bool ok) override {
if (!ok) {

@ -36,7 +36,7 @@ namespace testing {
class BenchmarkServiceImpl final : public BenchmarkService::Service {
public:
Status UnaryCall(ServerContext* context, const SimpleRequest* request,
Status UnaryCall(ServerContext* /*context*/, const SimpleRequest* request,
SimpleResponse* response) override {
auto s = SetResponse(request, response);
if (!s.ok()) {
@ -45,7 +45,7 @@ class BenchmarkServiceImpl final : public BenchmarkService::Service {
return Status::OK;
}
Status StreamingCall(
ServerContext* context,
ServerContext* /*context*/,
ServerReaderWriter<SimpleResponse, SimpleRequest>* stream) override {
SimpleRequest request;
while (stream->Read(&request)) {
@ -114,7 +114,7 @@ class BenchmarkServiceImpl final : public BenchmarkService::Service {
private:
template <class R>
static Status ClientPull(ServerContext* context, R* stream,
static Status ClientPull(ServerContext* /*context*/, R* stream,
SimpleResponse* response) {
SimpleRequest request;
while (stream->Read(&request)) {
@ -128,7 +128,7 @@ class BenchmarkServiceImpl final : public BenchmarkService::Service {
return Status::OK;
}
template <class W>
static Status ServerPush(ServerContext* context, W* stream,
static Status ServerPush(ServerContext* /*context*/, W* stream,
const SimpleResponse& response,
const std::function<bool()>& done) {
while ((done == nullptr) || !done()) {

Loading…
Cancel
Save