Skip to content

Commit

Permalink
apacheGH-38556: [C++] Add missing explicit size_t cast for i386 (apac…
Browse files Browse the repository at this point in the history
…he#38557)

### Rationale for this change

We need explicit cast for `int64_t` to `size_t` conversion for i386 environment.

This was introduced by apacheGH-37792.

### What changes are included in this PR?

Add explicit cast.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* Closes: apache#38556

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
  • Loading branch information
kou authored and loicalleyne committed Nov 13, 2023
1 parent 387b61c commit 739d126
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/src/arrow/array/data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ std::shared_ptr<ArrayData> ArraySpan::ToArrayData() const {
util::span<const std::shared_ptr<Buffer>> ArraySpan::GetVariadicBuffers() const {
DCHECK(HasVariadicBuffers());
return {buffers[2].data_as<std::shared_ptr<Buffer>>(),
buffers[2].size / sizeof(std::shared_ptr<Buffer>)};
static_cast<size_t>(buffers[2].size) / sizeof(std::shared_ptr<Buffer>)};
}

bool ArraySpan::HasVariadicBuffers() const {
Expand Down

0 comments on commit 739d126

Please sign in to comment.