From a06d127372d935fdea6389d456350257c3b30184 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 1 Oct 2025 15:12:35 +0100 Subject: [PATCH] libstdc++: Initialize local variable in __gnu_cxx::rope This avoids -Wmaybe-uninitialized warnings. libstdc++-v3/ChangeLog: * include/ext/ropeimpl.h (rope::_S_fetch): Initialize variable. --- libstdc++-v3/include/ext/ropeimpl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/include/ext/ropeimpl.h b/libstdc++-v3/include/ext/ropeimpl.h index 320192706ff9..00b334cb4f4e 100644 --- a/libstdc++-v3/include/ext/ropeimpl.h +++ b/libstdc++-v3/include/ext/ropeimpl.h @@ -1355,7 +1355,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION case __detail::_S_substringfn: { _RopeFunction* __f = (_RopeFunction*)__r; - _CharT __result; + _CharT __result = _CharT(); (*(__f->_M_fn))(__i, 1, &__result); return __result; -- 2.47.3