From 370533646763abc6d85c08946840d5c9438ec0d1 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Thu, 13 Oct 2022 08:30:04 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20build=20error:=20=E2=80=98temp=E2=80=99?= =?UTF-8?q?=20may=20be=20used=20uninitialized=20in=20this=20function=20[-W?= =?UTF-8?q?error=3Dmaybe-uninitialized]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #4753 --- .../ImportExport/MDL/utMDLImporter_HL1_ImportSettings.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/ImportExport/MDL/utMDLImporter_HL1_ImportSettings.cpp b/test/unit/ImportExport/MDL/utMDLImporter_HL1_ImportSettings.cpp index 02969e186..4614066e6 100644 --- a/test/unit/ImportExport/MDL/utMDLImporter_HL1_ImportSettings.cpp +++ b/test/unit/ImportExport/MDL/utMDLImporter_HL1_ImportSettings.cpp @@ -205,7 +205,7 @@ private: const char *key_name) { aiNode *global_info = get_global_info(scene); EXPECT_NE(nullptr, global_info); - T temp; + T temp = 0; EXPECT_TRUE(global_info->mMetaData->Get(key_name, temp)); EXPECT_EQ(expected_value, temp); } @@ -216,7 +216,7 @@ private: aiNode *global_info = get_global_info(scene); EXPECT_NE(nullptr, global_info); for (auto it = p_kv.begin(); it != p_kv.end(); ++it) { - T temp; + T temp = 0; EXPECT_TRUE(global_info->mMetaData->Get(it->second, temp)); EXPECT_EQ(it->first, temp); }