Closed andrewkcorcoran closed 1 year ago
I didn't have time to test it, but would this:
diff --git a/include/soci/values.h b/include/soci/values.h
index 5f9db2ff..8d782ad2 100644
--- a/include/soci/values.h
+++ b/include/soci/values.h
@@ -173,7 +173,7 @@ public:
indicator * pind = new indicator(indic);
indicators_.push_back(pind);
- base_type baseValue;
+ base_type baseValue{};
type_conversion<T>::to_base(value, baseValue, *pind);
details::copy_holder<base_type> * pcopy =
be enough to fix this?
Looks good
When a user builds SOCI with
-Werror=maybe-uninitialized
enabled and the compiler chooses to inline the below soci code a hard compiler errors results. This occurs even with the soci includes marked asSYSTEM
in CMake as inlining negates this protection.I believe changing
base_type baseValue;
tobase_type baseValue{};
atinclude/soci/values.h:176
would fix the issue