mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
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
This commit is contained in:
committed by
Brad King
parent
b1898bf975
commit
e4e85c5b2d
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user