This is an automated email from the ASF dual-hosted git repository.
lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 5c0cbee4d7 GH-36476: [C++][FlightRPC] Fix uninitialized fields in
FlightInfo (#36484)
5c0cbee4d7 is described below
commit 5c0cbee4d72289083a93494f8a21f31072480327
Author: David Li <[email protected]>
AuthorDate: Wed Jul 5 16:57:34 2023 -0400
GH-36476: [C++][FlightRPC] Fix uninitialized fields in FlightInfo (#36484)
### Rationale for this change
Fix CI
### What changes are included in this PR?
Provide initializers for fields
### Are these changes tested?
It's UB so it's hard to have a deterministic test
### Are there any user-facing changes?
No
* Closes: #36476
Authored-by: David Li <[email protected]>
Signed-off-by: David Li <[email protected]>
---
cpp/src/arrow/flight/types.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/cpp/src/arrow/flight/types.h b/cpp/src/arrow/flight/types.h
index e911babc76..3cca774314 100644
--- a/cpp/src/arrow/flight/types.h
+++ b/cpp/src/arrow/flight/types.h
@@ -610,9 +610,9 @@ class ARROW_FLIGHT_EXPORT FlightInfo {
std::string schema;
FlightDescriptor descriptor;
std::vector<FlightEndpoint> endpoints;
- int64_t total_records;
- int64_t total_bytes;
- bool ordered;
+ int64_t total_records = -1;
+ int64_t total_bytes = -1;
+ bool ordered = false;
};
explicit FlightInfo(Data data) : data_(std::move(data)),
reconstructed_schema_(false) {}