Skip to content

Commit 126bbe7

Browse files
committed
Use reinterpret_cast as Linux wchar_t is char16
1 parent 49e53df commit 126bbe7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cpp/src/arrow/flight/sql/odbc/odbc_impl/system_dsn.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void PostArrowUtilError(arrow::Status error_status) {
4848
std::wstring werror_msg = arrow::util::UTF8ToWideString(error_msg).ValueOr(
4949
L"Error during utf8 to wide string conversion");
5050

51-
PostError(ODBC_ERROR_GENERAL_ERR, const_cast<LPWSTR>(werror_msg.c_str()));
51+
PostError(ODBC_ERROR_GENERAL_ERR, const_cast<LPWSTR>(GET_SQWCHAR_PTR(werror_msg)));
5252
}
5353

5454
void PostLastInstallerError() {
@@ -70,7 +70,7 @@ void PostLastInstallerError() {
7070
#endif // __linux__
7171
std::wstring error_msg = buf.str();
7272

73-
PostError(code, const_cast<LPWSTR>(error_msg.c_str()));
73+
PostError(code, const_cast<LPWSTR>(GET_SQWCHAR_PTR(error_msg)));
7474
}
7575

7676
/**

0 commit comments

Comments
 (0)