From 0491f01ff4e3c576db998bfbe2ff90ee46e27610 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Mon, 6 Nov 2023 17:31:01 +0900 Subject: [PATCH] GH-38556: [C++] Add missing explicit size_t cast for i386 (#38557) ### Rationale for this change We need explicit cast for `int64_t` to `size_t` conversion for i386 environment. This was introduced by GH-37792. ### What changes are included in this PR? Add explicit cast. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * Closes: #38556 Authored-by: Sutou Kouhei Signed-off-by: Sutou Kouhei --- cpp/src/arrow/array/data.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/arrow/array/data.cc b/cpp/src/arrow/array/data.cc index 678513fd4d151..186682be3009e 100644 --- a/cpp/src/arrow/array/data.cc +++ b/cpp/src/arrow/array/data.cc @@ -568,7 +568,7 @@ std::shared_ptr ArraySpan::ToArrayData() const { util::span> ArraySpan::GetVariadicBuffers() const { DCHECK(HasVariadicBuffers()); return {buffers[2].data_as>(), - buffers[2].size / sizeof(std::shared_ptr)}; + static_cast(buffers[2].size) / sizeof(std::shared_ptr)}; } bool ArraySpan::HasVariadicBuffers() const {