diff --git a/paddle/operators/detail/grpc_client.cc b/paddle/operators/detail/grpc_client.cc index 90e2b29659b494493487b7a55532d580c2ad7387..c43394554263c761d010494f692a4050cae7e8cb 100644 --- a/paddle/operators/detail/grpc_client.cc +++ b/paddle/operators/detail/grpc_client.cc @@ -101,8 +101,8 @@ bool RPCClient::Wait() { if (req_count_ <= 0) { return true; } - - bool a[req_count_]; + const size_t kReqCnt = req_count_; + bool a[kReqCnt]; std::vector> waits(req_count_); for (int i = 0; i < req_count_; i++) {