diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CTest/cmCTestCVS.cxx | 4 | ||||
-rw-r--r-- | Source/cmExecProgramCommand.cxx | 2 | ||||
-rw-r--r-- | Source/cmExecuteProcessCommand.cxx | 2 | ||||
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 14 | ||||
-rw-r--r-- | Source/cmProcessTools.cxx | 2 |
5 files changed, 13 insertions, 11 deletions
diff --git a/Source/CTest/cmCTestCVS.cxx b/Source/CTest/cmCTestCVS.cxx index 4fb3273..6e1ada1 100644 --- a/Source/CTest/cmCTestCVS.cxx +++ b/Source/CTest/cmCTestCVS.cxx @@ -111,8 +111,8 @@ public: , Revisions(revs) , Section(SectionHeader) { - this->SetLog(&cvs->Log, prefix), - this->RegexRevision.compile("^revision +([^ ]*) *$"); + this->SetLog(&cvs->Log, prefix); + this->RegexRevision.compile("^revision +([^ ]*) *$"); this->RegexBranches.compile("^branches: .*$"); this->RegexPerson.compile("^date: +([^;]+); +author: +([^;]+);"); } diff --git a/Source/cmExecProgramCommand.cxx b/Source/cmExecProgramCommand.cxx index ea4cd40..e7f8a01 100644 --- a/Source/cmExecProgramCommand.cxx +++ b/Source/cmExecProgramCommand.cxx @@ -217,7 +217,7 @@ bool cmExecProgramCommand::RunCommand(const char* command, std::string& output, int p; cmProcessOutput processOutput(encoding); std::string strdata; - while ((p = cmsysProcess_WaitForData(cp, &data, &length, nullptr), p)) { + while ((p = cmsysProcess_WaitForData(cp, &data, &length, nullptr))) { if (p == cmsysProcess_Pipe_STDOUT || p == cmsysProcess_Pipe_STDERR) { if (verbose) { processOutput.DecodeText(data, length, strdata); diff --git a/Source/cmExecuteProcessCommand.cxx b/Source/cmExecuteProcessCommand.cxx index 679a648..b549776 100644 --- a/Source/cmExecuteProcessCommand.cxx +++ b/Source/cmExecuteProcessCommand.cxx @@ -244,7 +244,7 @@ bool cmExecuteProcessCommand::InitialPass(std::vector<std::string> const& args, int p; cmProcessOutput processOutput(encoding); std::string strdata; - while ((p = cmsysProcess_WaitForData(cp, &data, &length, nullptr), p)) { + while ((p = cmsysProcess_WaitForData(cp, &data, &length, nullptr))) { // Put the output in the right place. if (p == cmsysProcess_Pipe_STDOUT && !output_quiet) { if (output_variable.empty()) { diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index d6ab769..068cf5e 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -176,12 +176,14 @@ cmGlobalGenerator* cmGlobalXCodeGenerator::Factory::CreateGlobalGenerator( std::string versionFile; { std::string out; - std::string::size_type pos = 0; - if (cmSystemTools::RunSingleCommand("xcode-select --print-path", &out, - nullptr, nullptr, nullptr, - cmSystemTools::OUTPUT_NONE) && - (pos = out.find(".app/"), pos != std::string::npos)) { - versionFile = out.substr(0, pos + 5) + "Contents/version.plist"; + bool commandResult = cmSystemTools::RunSingleCommand( + "xcode-select --print-path", &out, nullptr, nullptr, nullptr, + cmSystemTools::OUTPUT_NONE); + if (commandResult) { + std::string::size_type pos = out.find(".app/"); + if (pos != std::string::npos) { + versionFile = out.substr(0, pos + 5) + "Contents/version.plist"; + } } } if (!versionFile.empty() && cmSystemTools::FileExists(versionFile.c_str())) { diff --git a/Source/cmProcessTools.cxx b/Source/cmProcessTools.cxx index facde5d..a2bc16f 100644 --- a/Source/cmProcessTools.cxx +++ b/Source/cmProcessTools.cxx @@ -16,7 +16,7 @@ void cmProcessTools::RunProcess(struct cmsysProcess_s* cp, OutputParser* out, cmProcessOutput processOutput(encoding); std::string strdata; while ((out || err) && - (p = cmsysProcess_WaitForData(cp, &data, &length, nullptr), p)) { + (p = cmsysProcess_WaitForData(cp, &data, &length, nullptr))) { if (out && p == cmsysProcess_Pipe_STDOUT) { processOutput.DecodeText(data, length, strdata, 1); if (!out->Process(strdata.c_str(), int(strdata.size()))) { |