mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-01 04:03:24 +03: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:
1 parent
92cd3d0677
commit
20ca9d8f6f
1 file changed
+1
-1
@@ -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