Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(c): suppress more MSVC warnings #1674

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions c/cmake_modules/AdbcDefines.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ if(MSVC)
# Allow incomplete switch (since MSVC warns even if there's a default case)
add_compile_options(/wd4061)
add_compile_options(/wd4100)
# Nanoarrow emits a lot of conversion warnings
add_compile_options(/wd4365)
add_compile_options(/wd4458)
add_compile_options(/wd4514)
add_compile_options(/wd4582)
add_compile_options(/wd4623)
add_compile_options(/wd4625)
add_compile_options(/wd4626)
Expand All @@ -85,6 +90,7 @@ if(MSVC)
add_compile_options(/wd4711)
# Don't warn about padding added after members
add_compile_options(/wd4820)
add_compile_options(/wd5027)
add_compile_options(/wd5045)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang"
OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
Expand Down
2 changes: 1 addition & 1 deletion c/driver/framework/base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ AdbcStatusCode Option::CGet(double* out, AdbcError* error) const {
[&](auto&& value) -> AdbcStatusCode {
using T = std::decay_t<decltype(value)>;
if constexpr (std::is_same_v<T, double> || std::is_same_v<T, int64_t>) {
*out = value;
*out = static_cast<double>(value);
return ADBC_STATUS_OK;
} else if constexpr (std::is_same_v<T, Unset>) {
return status::NotFound("Unknown option").ToAdbc(error);
Expand Down
2 changes: 1 addition & 1 deletion c/driver/framework/objects.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ struct GetObjectsBuilder {
table_types(table_types),
schema(schema),
array(array) {
na_error = {0};
std::memset(&na_error, 0, sizeof(na_error));
}

Status Build() {
Expand Down
Loading