mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-15 20:46:37 +08:00
Fixed all but one clang -Wcomma warning
This commit is contained in:
@@ -111,8 +111,8 @@ public:
|
|||||||
, Revisions(revs)
|
, Revisions(revs)
|
||||||
, Section(SectionHeader)
|
, Section(SectionHeader)
|
||||||
{
|
{
|
||||||
this->SetLog(&cvs->Log, prefix),
|
this->SetLog(&cvs->Log, prefix);
|
||||||
this->RegexRevision.compile("^revision +([^ ]*) *$");
|
this->RegexRevision.compile("^revision +([^ ]*) *$");
|
||||||
this->RegexBranches.compile("^branches: .*$");
|
this->RegexBranches.compile("^branches: .*$");
|
||||||
this->RegexPerson.compile("^date: +([^;]+); +author: +([^;]+);");
|
this->RegexPerson.compile("^date: +([^;]+); +author: +([^;]+);");
|
||||||
}
|
}
|
||||||
|
@@ -217,7 +217,7 @@ bool cmExecProgramCommand::RunCommand(const char* command, std::string& output,
|
|||||||
int p;
|
int p;
|
||||||
cmProcessOutput processOutput(encoding);
|
cmProcessOutput processOutput(encoding);
|
||||||
std::string strdata;
|
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 (p == cmsysProcess_Pipe_STDOUT || p == cmsysProcess_Pipe_STDERR) {
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
processOutput.DecodeText(data, length, strdata);
|
processOutput.DecodeText(data, length, strdata);
|
||||||
|
@@ -244,7 +244,7 @@ bool cmExecuteProcessCommand::InitialPass(std::vector<std::string> const& args,
|
|||||||
int p;
|
int p;
|
||||||
cmProcessOutput processOutput(encoding);
|
cmProcessOutput processOutput(encoding);
|
||||||
std::string strdata;
|
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.
|
// Put the output in the right place.
|
||||||
if (p == cmsysProcess_Pipe_STDOUT && !output_quiet) {
|
if (p == cmsysProcess_Pipe_STDOUT && !output_quiet) {
|
||||||
if (output_variable.empty()) {
|
if (output_variable.empty()) {
|
||||||
|
@@ -176,12 +176,14 @@ cmGlobalGenerator* cmGlobalXCodeGenerator::Factory::CreateGlobalGenerator(
|
|||||||
std::string versionFile;
|
std::string versionFile;
|
||||||
{
|
{
|
||||||
std::string out;
|
std::string out;
|
||||||
std::string::size_type pos = 0;
|
bool commandResult = cmSystemTools::RunSingleCommand(
|
||||||
if (cmSystemTools::RunSingleCommand("xcode-select --print-path", &out,
|
"xcode-select --print-path", &out, nullptr, nullptr, nullptr,
|
||||||
nullptr, nullptr, nullptr,
|
cmSystemTools::OUTPUT_NONE);
|
||||||
cmSystemTools::OUTPUT_NONE) &&
|
if (commandResult) {
|
||||||
(pos = out.find(".app/"), pos != std::string::npos)) {
|
std::string::size_type pos = out.find(".app/");
|
||||||
versionFile = out.substr(0, pos + 5) + "Contents/version.plist";
|
if (pos != std::string::npos) {
|
||||||
|
versionFile = out.substr(0, pos + 5) + "Contents/version.plist";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!versionFile.empty() && cmSystemTools::FileExists(versionFile.c_str())) {
|
if (!versionFile.empty() && cmSystemTools::FileExists(versionFile.c_str())) {
|
||||||
|
@@ -16,7 +16,7 @@ void cmProcessTools::RunProcess(struct cmsysProcess_s* cp, OutputParser* out,
|
|||||||
cmProcessOutput processOutput(encoding);
|
cmProcessOutput processOutput(encoding);
|
||||||
std::string strdata;
|
std::string strdata;
|
||||||
while ((out || err) &&
|
while ((out || err) &&
|
||||||
(p = cmsysProcess_WaitForData(cp, &data, &length, nullptr), p)) {
|
(p = cmsysProcess_WaitForData(cp, &data, &length, nullptr))) {
|
||||||
if (out && p == cmsysProcess_Pipe_STDOUT) {
|
if (out && p == cmsysProcess_Pipe_STDOUT) {
|
||||||
processOutput.DecodeText(data, length, strdata, 1);
|
processOutput.DecodeText(data, length, strdata, 1);
|
||||||
if (!out->Process(strdata.c_str(), int(strdata.size()))) {
|
if (!out->Process(strdata.c_str(), int(strdata.size()))) {
|
||||||
|
Reference in New Issue
Block a user