mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
cmGlobalXCodeGenerator: Avoid -Wconditional-uninitialized warning
Clang incorrectly warns about a case where we initialize a variable inside a condition in such a way that it will always be initialized before we use it. Simply initialize the variable when defining it to silence the warning.
This commit is contained in:
@@ -176,7 +176,7 @@ cmGlobalGenerator* cmGlobalXCodeGenerator::Factory::CreateGlobalGenerator(
|
||||
std::string versionFile;
|
||||
{
|
||||
std::string out;
|
||||
std::string::size_type pos;
|
||||
std::string::size_type pos = 0;
|
||||
if (cmSystemTools::RunSingleCommand("xcode-select --print-path", &out,
|
||||
nullptr, nullptr, nullptr,
|
||||
cmSystemTools::OUTPUT_NONE) &&
|
||||
|
||||
Reference in New Issue
Block a user