Skip to content

Commit

Permalink
ARROW-8242: [C++] Flight fails to compile on GCC 4.8
Browse files Browse the repository at this point in the history
The error has occured in the manylinux1 builds.

Closes #6739 from kszucs/ARROW-8242

Authored-by: Krisztián Szűcs <szucs.krisztian@gmail.com>
Signed-off-by: Wes McKinney <wesm+git@apache.org>
  • Loading branch information
kszucs authored and wesm committed Mar 27, 2020
1 parent 0f512af commit 26bd82f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions cpp/src/arrow/flight/client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,11 @@ Status GrpcStreamReader::Open(std::unique_ptr<ClientRpc> rpc,
std::unique_ptr<GrpcStreamReader>* out) {
*out = std::unique_ptr<GrpcStreamReader>(new GrpcStreamReader);
out->get()->rpc_ = std::move(rpc);
std::unique_ptr<GrpcIpcMessageReader> message_reader(
auto reader = std::unique_ptr<ipc::MessageReader>(
new GrpcIpcMessageReader(out->get(), out->get()->rpc_, std::move(stream)));
return (ipc::RecordBatchStreamReader::Open(std::move(message_reader))
.Value(&(*out)->batch_reader_));
ARROW_ASSIGN_OR_RAISE((*out)->batch_reader_,
ipc::RecordBatchStreamReader::Open(std::move(reader)));
return Status::OK();
}

std::shared_ptr<Schema> GrpcStreamReader::schema() const {
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/arrow/flight/internal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static Status FromGrpcContext(const grpc::ClientContext& ctx, Status* status) {
}

const grpc::string_ref code_ref = (*code_val).second;
StatusCode code;
StatusCode code = {};
RETURN_NOT_OK(StatusCodeFromString(code_ref, &code));

const auto message_val = trailers.find(kGrpcStatusMessageHeader);
Expand Down

0 comments on commit 26bd82f

Please sign in to comment.