HuaHuaY opened a new issue, #50756:
URL: https://github.com/apache/arrow/issues/50756
### Describe the bug, including details regarding any error messages,
version, and platform.
There are four kinds of compile errors.
1. Incorrect initialization way.
```cpp
[build]
/Users/huahua/github/arrow/.worktree/pr_review/cpp/src/arrow/flight/sql/odbc/odbc_impl/accessors/timestamp_array_accessor.cc:98:20:
error: missing field 'tm_min' initializer
[-Werror,-Wmissing-field-initializers]
[build] 98 | tm timestamp = {0};
[build] |
```
2. Used a deprecated standard library API `std::wstring_convert` and
`std::codecvt_utf8`.
```cpp
[build] In file included from
/Users/huahua/github/arrow/.worktree/pr_review/cpp/src/arrow/flight/sql/odbc/odbc_impl/encoding.cc:18:
[build] In file included from
/Users/huahua/github/arrow/.worktree/pr_review/cpp/src/arrow/flight/sql/odbc/odbc_impl/encoding.h:23:
[build]
/nix/store/4b6hc41dl32baac3vwy7xa29xzz14rzp-libcxx-20.1.8-dev/include/c++/v1/locale:3226:1:
error: 'wstring_convert<std::codecvt_utf8<char16_t>, char16_t>' is deprecated
[-Werror,-Wdeprecated-declarations]
[build] 3226 | wstring_convert<_Codecvt, _Elem, _WideAlloc,
_ByteAlloc>::to_bytes(const _Elem* __frm, const _Elem* __frm_end) {
[build] | ^
```
3. Implicit conversion loses integer precision.
```cpp
[build]
/Users/huahua/github/arrow/.worktree/pr_review/cpp/src/arrow/flight/sql/odbc/odbc_impl/odbc_descriptor.cc:489:49:
error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned
long') to 'int' [-Werror,-Wshorten-64-to-32]
[build] 489 | int16_t concise_type =
rsmd->GetConciseType(one_based_index);
[build] |
```
4. Unused private field.
```cpp
[build] In file included from
/Users/huahua/github/arrow/.worktree/pr_review/cpp/src/arrow/flight/sql/odbc/odbc_impl/flight_sql_connection.cc:18:
[build]
/Users/huahua/github/arrow/.worktree/pr_review/cpp/src/arrow/flight/sql/odbc/odbc_impl/flight_sql_connection.h:50:15:
error: private field 'odbc_version_' is not used
[-Werror,-Wunused-private-field]
[build] 50 | OdbcVersion odbc_version_;
[build] | ^
[build] 1 error generated.
```
### Component(s)
C++, FlightRPC
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]