You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2023/11/06 08:31:08 UTC
(arrow) branch main updated: GH-38556: [C++] Add missing explicit size_t cast for i386 (#38557)
This is an automated email from the ASF dual-hosted git repository.
kou 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 9a364b8ea9 GH-38556: [C++] Add missing explicit size_t cast for i386 (#38557)
9a364b8ea9 is described below
commit 9a364b8ea955097f6cd5721fd9a42606b7d83b08
Author: Sutou Kouhei <ko...@clear-code.com>
AuthorDate: Mon Nov 6 17:31:01 2023 +0900
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 <ko...@clear-code.com>
Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
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 678513fd4d..186682be30 100644
--- a/cpp/src/arrow/array/data.cc
+++ b/cpp/src/arrow/array/data.cc
@@ -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 {