From 46fcfeb4656cc4144b0332eeb7b3c202f3f76f98 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sat, 7 Oct 2023 06:36:15 +0900 Subject: [PATCH] GH-38090: [C++][Emscripten] chunked_array: Suppress shorten-64-to-32 warnings We need explicit cast to use `int64_t` for `size_t` on Emscripten. Explicit casts. --- cpp/src/arrow/chunked_array.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/arrow/chunked_array.cc b/cpp/src/arrow/chunked_array.cc index 12937406e7800..3523059647900 100644 --- a/cpp/src/arrow/chunked_array.cc +++ b/cpp/src/arrow/chunked_array.cc @@ -172,7 +172,7 @@ Result> ChunkedArray::GetScalar(int64_t index) const { return Status::IndexError("index with value of ", index, " is out-of-bounds for chunked array of length ", length_); } - return chunks_[loc.chunk_index]->GetScalar(loc.index_in_chunk); + return chunks_[static_cast(loc.chunk_index)]->GetScalar(loc.index_in_chunk); } std::shared_ptr ChunkedArray::Slice(int64_t offset, int64_t length) const {