From df7ad61eb3ce52ebf864f30ec3ad1a6ccea74730 Mon Sep 17 00:00:00 2001
From: cuiziwei <cuiziwei@xiaomi.com>
Date: Thu, 23 May 2024 11:11:30 +0800
libcxxabi:Fix build warnings generated by CMake
 compilation.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

VELAPLATFO-32782

nuttx/libs/libxx/libcxxabi/src/cxa_personality.cpp: In function ‘void __cxxabiv1::__cxa_call_unexpected(void*)’:
nuttx/libs/libxx/libcxxabi/src/cxa_personality.cpp:1250:46: warning: ‘ttypeIndex’ may be used uninitialized [-Wmaybe-uninitialized]
 1250 |                 if (!exception_spec_can_catch(ttypeIndex, classInfo, ttypeEncoding,
      |                      ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1251 |                                               excpType, adjustedPtr,
      |                                               ~~~~~~~~~~~~~~~~~~~~~~
 1252 |                                               unwind_exception, base))

Change-Id: Ic114508ecdad7cc84e7ad997a9379e50b2efd2a5
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
---
 src/cxa_personality.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git libcxxabi/src/cxa_personality.cpp libcxxabi/src/cxa_personality.cpp
index b28c58d..5b58037 100644
--- libcxxabi/src/cxa_personality.cpp
+++ libcxxabi/src/cxa_personality.cpp
@@ -1174,7 +1174,7 @@ __cxa_call_unexpected(void* arg)
     std::unexpected_handler u_handler;
     std::terminate_handler t_handler;
     __cxa_exception* old_exception_header = 0;
-    int64_t ttypeIndex;
+    int64_t ttypeIndex = 0;
     const uint8_t* lsda;
     uintptr_t base = 0;
 
-- 
2.34.1