From a4fb0b048daf62097a85d3359ddd6c553bfd6f25 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 12 Mar 2023 01:02:57 +0100 Subject: [PATCH] Always initialize a variable to avoid -Wmaybe-uninitialized This warning is sometimes given (e.g. when using optional) and can't be easily suppressed from the application code, so ensure the variable is always initialized to avoid it. Closes #1037. See #1038. --- include/soci/values.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/soci/values.h b/include/soci/values.h index 5f9db2ff4..8d782ad21 100644 --- a/include/soci/values.h +++ b/include/soci/values.h @@ -173,7 +173,7 @@ class SOCI_DECL values indicator * pind = new indicator(indic); indicators_.push_back(pind); - base_type baseValue; + base_type baseValue{}; type_conversion::to_base(value, baseValue, *pind); details::copy_holder * pcopy =