From b157517b9f395f45aab6425c8549be1d4744c36a Mon Sep 17 00:00:00 2001 From: Joe Isaacs Date: Fri, 13 Mar 2026 17:28:33 +0000 Subject: [PATCH] Suppress -Wtype-limits warning in DuckDB C++ compilation Signed-off-by: Joe Isaacs Co-Authored-By: Claude Opus 4.6 --- vortex-duckdb/build.rs | 10 ++++++++-- vortex-duckdb/cpp/CMakeLists.txt | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/vortex-duckdb/build.rs b/vortex-duckdb/build.rs index be20dde4b8a..e78cc423534 100644 --- a/vortex-duckdb/build.rs +++ b/vortex-duckdb/build.rs @@ -325,8 +325,14 @@ fn c2rust(crate_dir: &Path, duckdb_include_dir: &Path) { fn cpp(duckdb_include_dir: &Path) { cc::Build::new() .std("c++20") - // Duckdb sources fail -Wno-unused-parameter - .flags(["-Wall", "-Wextra", "-Wpedantic", "-Wno-unused-parameter"]) + // Duckdb sources fail -Wno-unused-parameter and -Wno-type-limits + .flags([ + "-Wall", + "-Wextra", + "-Wpedantic", + "-Wno-unused-parameter", + "-Wno-type-limits", + ]) .cpp(true) .include(duckdb_include_dir) .include("cpp/include") diff --git a/vortex-duckdb/cpp/CMakeLists.txt b/vortex-duckdb/cpp/CMakeLists.txt index 9671d93dd6d..b854ce2dfd9 100644 --- a/vortex-duckdb/cpp/CMakeLists.txt +++ b/vortex-duckdb/cpp/CMakeLists.txt @@ -23,7 +23,7 @@ if (NOT CMAKE_BUILD_TYPE) endif() # Enable compiler warnings (matching build.rs flags). -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wno-type-limits") # Find DuckDB include directory via the symlink created by build.rs. # The symlink points to target/duckdb-source-vX.Y.Z which contains duckdb-X.Y.Z/