From 0cb51f82888eedd66649ad1d24fd09433729305b Mon Sep 17 00:00:00 2001 From: z0mz0m Date: Mon, 27 Jul 2026 11:45:15 +0200 Subject: [PATCH] Fix -Wnonnull build failure: value-initialize TypedStats::last_seen_val TypedStats is explicitly instantiated for every PT in FLS_ALL_CTS, including str_pt. The member initializer last_seen_val(0) therefore instantiates as std::string(0) == std::string(nullptr), which is undefined behaviour; clang 21 diagnoses it as -Wnonnull and the build fails under -Werror: src/table/stats.cpp:17:21: error: null passed to a callee that requires a non-null argument [-Werror,-Wnonnull] Value-initializing instead gives 0 for the arithmetic instantiations and an empty string for str_pt, with no behaviour change for the numeric types. Co-Authored-By: Claude Fable 5 --- src/table/stats.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/table/stats.cpp b/src/table/stats.cpp index 701eaf17..49b39830 100644 --- a/src/table/stats.cpp +++ b/src/table/stats.cpp @@ -14,7 +14,7 @@ template TypedStats::TypedStats() : min {std::numeric_limits::max()} // , max {std::numeric_limits::lowest()} // - , last_seen_val(0) // NOLINT + , last_seen_val {} // NOLINT , n_nulls(0) , is_double_castable(false) { }