From e4e85c5b2d666165bb5dad4e01a78ef72dcb1481 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 5 Oct 2020 14:39:37 +0200 Subject: cmake: Fix uninitialized member in HandleDeleteCacheVariables If there is no existing value, mark the saved entry as UNINITIALIZED (avoids compiler warning about uninitialized type). Issue: #21166 --- Source/cmake.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index dc06fae..d9c6b7a 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1409,6 +1409,8 @@ int cmake::HandleDeleteCacheVariables(const std::string& var) this->State->GetCacheEntryProperty(save.key, "HELPSTRING")) { save.help = *help; } + } else { + save.type = cmStateEnums::CacheEntryType::UNINITIALIZED; } saved.push_back(std::move(save)); } -- cgit v0.12