diff options
author | Brad King <brad.king@kitware.com> | 2018-01-29 14:21:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-01-29 14:21:46 (GMT) |
commit | 20ca9d8f6f4ddd7b56829425950332d972efef11 (patch) | |
tree | 0aff4b28b71a515bf84960a1a9581aaacdafdbf0 /Source/cmGlobalXCodeGenerator.cxx | |
parent | 92cd3d06772ada13935790d66927ab4663c7d628 (diff) | |
download | CMake-20ca9d8f6f4ddd7b56829425950332d972efef11.zip CMake-20ca9d8f6f4ddd7b56829425950332d972efef11.tar.gz CMake-20ca9d8f6f4ddd7b56829425950332d972efef11.tar.bz2 |
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.
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 9db21d8..7668fd0 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -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) && |