diff --git a/.clang-tidy b/.clang-tidy index 2b7c9aeac0ed58d389f3deef50f6fd8e49fff089..6f96c22981bdf8d9ed4b621f28a34be027018e28 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -28,7 +28,6 @@ readability-*,\ -readability-implicit-bool-cast,\ -readability-implicit-bool-conversion,\ -readability-inconsistent-declaration-parameter-name,\ --readability-isolate-declaration,\ -readability-magic-numbers,\ -readability-named-parameter,\ -readability-redundant-declaration,\ diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx index 7caed0cd50de7a6aaeb4a340e6f5c9ffdc926e79..ce328984f6be84a174abeb1e6b3a6fb31ef76de2 100644 --- a/Source/CursesDialog/ccmake.cxx +++ b/Source/CursesDialog/ccmake.cxx @@ -56,7 +56,8 @@ void onsig(int /*unused*/) cbreak(); /* nl- or cr not needed */ keypad(stdscr, true); /* Use key symbols as KEY_DOWN */ refresh(); - int x, y; + int x; + int y; getmaxyx(stdscr, y, x); cmCursesForm::CurrentForm->Render(1, 1, x, y); cmCursesForm::CurrentForm->UpdateStatusBar(); @@ -127,7 +128,8 @@ int main(int argc, char const* const* argv) signal(SIGWINCH, onsig); - int x, y; + int x; + int y; getmaxyx(stdscr, y, x); if (x < cmCursesMainForm::MIN_WIDTH || y < cmCursesMainForm::MIN_HEIGHT) { endwin(); diff --git a/Source/CursesDialog/cmCursesLongMessageForm.cxx b/Source/CursesDialog/cmCursesLongMessageForm.cxx index 4e887d68f56505d5332210ae873473dda1d6a15a..95026d5474956e36bb30ca5c5b37c8430c2117c8 100644 --- a/Source/CursesDialog/cmCursesLongMessageForm.cxx +++ b/Source/CursesDialog/cmCursesLongMessageForm.cxx @@ -38,7 +38,8 @@ cmCursesLongMessageForm::~cmCursesLongMessageForm() void cmCursesLongMessageForm::UpdateStatusBar() { - int x, y; + int x; + int y; getmaxyx(stdscr, y, x); char bar[cmCursesMainForm::MAX_WIDTH]; @@ -81,7 +82,8 @@ void cmCursesLongMessageForm::UpdateStatusBar() void cmCursesLongMessageForm::PrintKeys() { - int x, y; + int x; + int y; getmaxyx(stdscr, y, x); if (x < cmCursesMainForm::MIN_WIDTH || y < cmCursesMainForm::MIN_HEIGHT) { return; @@ -98,7 +100,8 @@ void cmCursesLongMessageForm::PrintKeys() void cmCursesLongMessageForm::Render(int /*left*/, int /*top*/, int /*width*/, int /*height*/) { - int x, y; + int x; + int y; getmaxyx(stdscr, y, x); if (this->Form) { diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index 9ac80b87fed5c9d69cb8433091b479d31955a81b..9115a3bdd242013e51a19c0d1689b62d71e833a7 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -320,7 +320,8 @@ void cmCursesMainForm::Render(int left, int top, int width, int height) void cmCursesMainForm::PrintKeys(int process /* = 0 */) { - int x, y; + int x; + int y; getmaxyx(stdscr, y, x); if (x < cmCursesMainForm::MIN_WIDTH || x < this->InitialWidth || y < cmCursesMainForm::MIN_HEIGHT) { @@ -391,7 +392,8 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */) // on the status bar. Designed for a width of 80 chars. void cmCursesMainForm::UpdateStatusBar(const char* message) { - int x, y; + int x; + int y; getmaxyx(stdscr, y, x); // If window size is too small, display error and return if (x < cmCursesMainForm::MIN_WIDTH || x < this->InitialWidth || @@ -509,7 +511,8 @@ void cmCursesMainForm::UpdateProgress(const std::string& msg, float prog) int cmCursesMainForm::Configure(int noconfigure) { - int xi, yi; + int xi; + int yi; getmaxyx(stdscr, yi, xi); curses_move(1, 1); @@ -552,7 +555,8 @@ int cmCursesMainForm::Configure(int noconfigure) if (cmSystemTools::GetErrorOccuredFlag()) { this->OkToGenerate = false; } - int xx, yy; + int xx; + int yy; getmaxyx(stdscr, yy, xx); cmCursesLongMessageForm* msgs = new cmCursesLongMessageForm(this->Errors, @@ -581,7 +585,8 @@ int cmCursesMainForm::Configure(int noconfigure) int cmCursesMainForm::Generate() { - int xi, yi; + int xi; + int yi; getmaxyx(stdscr, yi, xi); curses_move(1, 1); @@ -610,7 +615,8 @@ int cmCursesMainForm::Generate() } // reset error condition cmSystemTools::ResetErrorOccuredFlag(); - int xx, yy; + int xx; + int yy; getmaxyx(stdscr, yy, xx); const char* title = "Messages during last pass."; if (cmSystemTools::GetErrorOccuredFlag()) { @@ -707,7 +713,8 @@ void cmCursesMainForm::FixValue(cmStateEnums::CacheEntryType type, void cmCursesMainForm::HandleInput() { - int x = 0, y = 0; + int x = 0; + int y = 0; if (!this->Form) { return; diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx index 5e2a329d99d121521bc96bda7d262f3852a5b156..26724e79ecc157a538ef614470ea21c9164db363 100644 --- a/Source/CursesDialog/cmCursesStringWidget.cxx +++ b/Source/CursesDialog/cmCursesStringWidget.cxx @@ -64,7 +64,8 @@ void cmCursesStringWidget::OnType(int& key, cmCursesMainForm* fm, bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w) { - int x, y; + int x; + int y; FORM* form = fm->GetForm(); // when not in edit mode, edit mode is entered by pressing enter or i (vim @@ -179,7 +180,8 @@ const char* cmCursesStringWidget::GetValue() bool cmCursesStringWidget::PrintKeys() { - int x, y; + int x; + int y; getmaxyx(stdscr, y, x); if (x < cmCursesMainForm::MIN_WIDTH || y < cmCursesMainForm::MIN_HEIGHT) { return false; diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx index 78a2710247d276074c047823713e91e0109efd54..5e8636a7f3845d05dab51d6df9d7518c97ee3629 100644 --- a/Source/QtDialog/QCMakeCacheView.cxx +++ b/Source/QtDialog/QCMakeCacheView.cxx @@ -210,7 +210,8 @@ void QCMakeCacheModel::clear() void QCMakeCacheModel::setProperties(const QCMakePropertyList& props) { - QSet newProps, newProps2; + QSet newProps; + QSet newProps2; if (this->ShowNewProperties) { newProps = props.toSet(); diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx index e502a6457bcca41d540af660eecc68c28296e9a6..11d28c28a548fe1c0e12e012dce7a1e5a58fe86b 100644 --- a/Source/cmAddCustomCommandCommand.cxx +++ b/Source/cmAddCustomCommandCommand.cxx @@ -33,10 +33,18 @@ bool cmAddCustomCommandCommand(std::vector const& args, } cmMakefile& mf = status.GetMakefile(); - std::string source, target, main_dependency, working, depfile, job_pool; + std::string source; + std::string target; + std::string main_dependency; + std::string working; + std::string depfile; + std::string job_pool; std::string comment_buffer; const char* comment = nullptr; - std::vector depends, outputs, output, byproducts; + std::vector depends; + std::vector outputs; + std::vector output; + std::vector byproducts; bool verbatim = false; bool append = false; bool uses_terminal = false; diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx index f812ab5e844916f7f5deff34418945ce0244aebc..c14b7454be8ae55369f29907ce3901a6d1bea973 100644 --- a/Source/cmAddCustomTargetCommand.cxx +++ b/Source/cmAddCustomTargetCommand.cxx @@ -43,7 +43,8 @@ bool cmAddCustomTargetCommand(std::vector const& args, cmCustomCommandLines commandLines; // Accumulate dependencies. - std::vector depends, byproducts; + std::vector depends; + std::vector byproducts; std::string working_directory; bool verbatim = false; bool uses_terminal = false; diff --git a/Source/cmBinUtilsMacOSMachOLinker.cxx b/Source/cmBinUtilsMacOSMachOLinker.cxx index 0c73ac8415fd47b824c45d31ae7f5478727989bf..7ff85846828817ac316082c7ca51ceb392803397 100644 --- a/Source/cmBinUtilsMacOSMachOLinker.cxx +++ b/Source/cmBinUtilsMacOSMachOLinker.cxx @@ -59,7 +59,8 @@ bool cmBinUtilsMacOSMachOLinker::ScanDependencies( bool cmBinUtilsMacOSMachOLinker::ScanDependencies( std::string const& file, std::string const& executablePath) { - std::vector libs, rpaths; + std::vector libs; + std::vector rpaths; if (!this->Tool->GetFileInfo(file, libs, rpaths)) { return false; } diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 4f7eaea719c8be6c20666575847acd62958ec3f2..9867f165291a123eb6309fd094c64b6c8d8051d8 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2759,7 +2759,9 @@ bool HandleGetRuntimeDependenciesCommand(std::vector const& args, return false; } - std::vector deps, unresolvedDeps, conflictingDeps; + std::vector deps; + std::vector unresolvedDeps; + std::vector conflictingDeps; for (auto const& val : archive.GetResolvedPaths()) { bool unique = true; auto it = val.second.begin(); diff --git a/Source/cmFileTimeCache.cxx b/Source/cmFileTimeCache.cxx index 24d6bf6e13c778856474e48150475d68cbf61bed..0d1dae5e801a6cfb2a6a8b4c6d220f57e94d9845 100644 --- a/Source/cmFileTimeCache.cxx +++ b/Source/cmFileTimeCache.cxx @@ -38,7 +38,8 @@ bool cmFileTimeCache::Compare(std::string const& f1, std::string const& f2, int* result) { // Get the modification time for each file. - cmFileTime ft1, ft2; + cmFileTime ft1; + cmFileTime ft2; if (this->Load(f1, ft1) && this->Load(f2, ft2)) { // Compare the two modification times. *result = ft1.Compare(ft2); @@ -52,7 +53,8 @@ bool cmFileTimeCache::Compare(std::string const& f1, std::string const& f2, bool cmFileTimeCache::DifferS(std::string const& f1, std::string const& f2) { // Get the modification time for each file. - cmFileTime ft1, ft2; + cmFileTime ft1; + cmFileTime ft2; if (this->Load(f1, ft1) && this->Load(f2, ft2)) { // Compare the two modification times. return ft1.DifferS(ft2); diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 8cd8858702c58a5e598bed65d80a90ae6fd253e2..f1811329b5b606d0bf82e6be92e9df8fad6fc95e 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -275,7 +275,8 @@ static const struct InListNode : public cmGeneratorExpressionNode const GeneratorExpressionContent* /*content*/, cmGeneratorExpressionDAGChecker* /*dagChecker*/) const override { - std::vector values, checkValues; + std::vector values; + std::vector checkValues; bool check = false; switch (context->LG->GetPolicyStatus(cmPolicies::CMP0085)) { case cmPolicies::WARN: @@ -344,7 +345,8 @@ static const struct FilterNode : public cmGeneratorExpressionNode return {}; } - std::vector values, result; + std::vector values; + std::vector result; cmExpandList(parameters.front(), values, true); std::copy_if(values.cbegin(), values.cend(), std::back_inserter(result), @@ -1105,7 +1107,8 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode static cmsys::RegularExpression propertyNameValidator("^[A-Za-z0-9_]+$"); cmGeneratorTarget const* target = nullptr; - std::string targetName, propertyName; + std::string targetName; + std::string propertyName; if (parameters.size() == 2) { targetName = parameters[0]; diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index fd16dbf29d9a926d78b3c1be1955c347df72a2ce..e62b692b0e94d1afe316c1c14d377fa489e87ad4 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -526,7 +526,9 @@ std::string cmGeneratorTarget::GetFilePrefix( return prefix ? prefix : std::string(); } - std::string prefix, suffix, base; + std::string prefix; + std::string suffix; + std::string base; this->GetFullNameInternal(config, artifact, prefix, base, suffix); return prefix; } @@ -539,7 +541,9 @@ std::string cmGeneratorTarget::GetFileSuffix( return suffix ? suffix : std::string(); } - std::string prefix, suffix, base; + std::string prefix; + std::string suffix; + std::string base; this->GetFullNameInternal(config, artifact, prefix, base, suffix); return suffix; } diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index 7d0ef83ea3a118fb7bb569ba0c143af79c21c858..cae813653c7b9750dc6b9fea6a7b71380646e65c 100644 --- a/Source/cmGraphVizWriter.cxx +++ b/Source/cmGraphVizWriter.cxx @@ -74,7 +74,8 @@ std::map getScopedLinkLibrariesFromTarget( { char sep = ';'; std::map tokens; - size_t start = 0, end = 0; + size_t start = 0; + size_t end = 0; const char* pInterfaceLinkLibraries = Target->GetProperty("INTERFACE_LINK_LIBRARIES"); diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index ed1c80a7578b2c63a641bd567f943506bc24d1b3..7bc9fdfbdb8490db3679aba4f3ce073d273dafc6 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -688,7 +688,8 @@ void cmInstallTargetGenerator::AddChrpathPatchRule( std::string installNameTool = mf->GetSafeDefinition("CMAKE_INSTALL_NAME_TOOL"); - std::vector oldRuntimeDirs, newRuntimeDirs; + std::vector oldRuntimeDirs; + std::vector newRuntimeDirs; cli->GetRPath(oldRuntimeDirs, false); cli->GetRPath(newRuntimeDirs, true); diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx index 9a6653ff3506f33ca689922386a3dbb7d6f24608..aed54ea5db094c7e10bf20b983f8f9dda7355bda 100644 --- a/Source/cmListCommand.cxx +++ b/Source/cmListCommand.cxx @@ -695,7 +695,8 @@ public: } this->Indexes.resize(size); - auto start = this->Start, step = this->Step; + auto start = this->Start; + auto step = this->Step; std::generate(this->Indexes.begin(), this->Indexes.end(), [&start, step]() -> int { auto r = start; @@ -919,8 +920,10 @@ bool cmListCommand::HandleTransformCommand( } } - const std::string REGEX{ "REGEX" }, AT{ "AT" }, FOR{ "FOR" }, - OUTPUT_VARIABLE{ "OUTPUT_VARIABLE" }; + const std::string REGEX{ "REGEX" }; + const std::string AT{ "AT" }; + const std::string FOR{ "FOR" }; + const std::string OUTPUT_VARIABLE{ "OUTPUT_VARIABLE" }; // handle optional arguments while (args.size() > index) { @@ -997,7 +1000,9 @@ bool cmListCommand::HandleTransformCommand( return false; } - int start = 0, stop = 0, step = 1; + int start = 0; + int stop = 0; + int step = 1; bool valid = true; try { std::size_t pos; diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 51d8d43b3aef4578fbc0b25c0f891a40113ed08d..d3a5535c8dd91fb98b4f8289621f3ad36bb9376d 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1033,8 +1033,8 @@ std::vector> cmLocalGenerator::GetIncludeDirectoriesImplicit( // Support putting all the in-project include directories first if // it is requested by the project. if (this->Makefile->IsOn("CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE")) { - std::string const &topSourceDir = this->GetState()->GetSourceDirectory(), - &topBinaryDir = this->GetState()->GetBinaryDirectory(); + std::string const& topSourceDir = this->GetState()->GetSourceDirectory(); + std::string const& topBinaryDir = this->GetState()->GetBinaryDirectory(); for (BT const& udr : userDirs) { // Emit this directory only if it is a subdirectory of the // top-level source or binary tree. diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index ec35551a87c198f85440b2d4d11f4176c55295fa..220553ba9bf1210e6a0ed6bcf08120ca90328b01 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -556,7 +556,8 @@ void cmLocalNinjaGenerator::WriteCustomCommandBuildStatements() ++j; for (; j != i->second.end(); ++j) { - std::vector jDeps, depsIntersection; + std::vector jDeps; + std::vector depsIntersection; this->GetGlobalNinjaGenerator()->AppendTargetDependsClosure(*j, jDeps); std::sort(jDeps.begin(), jDeps.end()); std::set_intersection(ccTargetDeps.begin(), ccTargetDeps.end(), diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 4ebeb60c02dfc27f1cb596645f7ccf668737fc18..15c6580365d5caa728adebaa73560fb343e57b7b 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -967,7 +967,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() >->GetPostBuildCommands() }; - std::vector preLinkCmdLines, postBuildCmdLines; + std::vector preLinkCmdLines; + std::vector postBuildCmdLines; std::vector* cmdLineLists[3] = { &preLinkCmdLines, &preLinkCmdLines, &postBuildCmdLines }; diff --git a/Source/cmNinjaUtilityTargetGenerator.cxx b/Source/cmNinjaUtilityTargetGenerator.cxx index 8fca4c0e970ff2b8725b9e9236dac19a152ddb34..4f0f92b09001d64084b31096b853492216ca9a82 100644 --- a/Source/cmNinjaUtilityTargetGenerator.cxx +++ b/Source/cmNinjaUtilityTargetGenerator.cxx @@ -43,7 +43,8 @@ void cmNinjaUtilityTargetGenerator::Generate() cmNinjaBuild phonyBuild("phony"); std::vector commands; - cmNinjaDeps deps, util_outputs(1, utilCommandName); + cmNinjaDeps deps; + cmNinjaDeps util_outputs(1, utilCommandName); bool uses_terminal = false; { diff --git a/Source/cmParseArgumentsCommand.cxx b/Source/cmParseArgumentsCommand.cxx index 5e7e2f3b1c5a6b46541266105a7cf348a1046539..28d11cce0ed68dc2e940f12422f05c95685bfbc0 100644 --- a/Source/cmParseArgumentsCommand.cxx +++ b/Source/cmParseArgumentsCommand.cxx @@ -117,8 +117,8 @@ bool cmParseArgumentsCommand::InitialPass(std::vector const& args, return false; } - std::vector::const_iterator argIter = args.begin(), - argEnd = args.end(); + std::vector::const_iterator argIter = args.begin(); + std::vector::const_iterator argEnd = args.end(); bool parseFromArgV = false; unsigned long argvStart = 0; if (*argIter == "PARSE_ARGV") { diff --git a/Source/cmQtAutoMocUic.cxx b/Source/cmQtAutoMocUic.cxx index 2cbf113882aeecd4d7efa31554600064eca7ddbe..7148fc1a2b508664a90f5ef761ba65d6a7e987b5 100644 --- a/Source/cmQtAutoMocUic.cxx +++ b/Source/cmQtAutoMocUic.cxx @@ -1762,7 +1762,8 @@ bool cmQtAutoMocUic::Init(cmMakefile* makefile) // Headers { // Get file lists - const char *keyFiles = "AM_HEADERS", *keyFlags = "AM_HEADERS_FLAGS"; + const char* keyFiles = "AM_HEADERS"; + const char* keyFlags = "AM_HEADERS_FLAGS"; std::vector files = InfoGetList(keyFiles); std::vector flags = InfoGetList(keyFlags); std::vector builds; @@ -1797,7 +1798,8 @@ bool cmQtAutoMocUic::Init(cmMakefile* makefile) // Sources { - const char *keyFiles = "AM_SOURCES", *keyFlags = "AM_SOURCES_FLAGS"; + const char* keyFiles = "AM_SOURCES"; + const char* keyFlags = "AM_SOURCES_FLAGS"; std::vector files = InfoGetList(keyFiles); std::vector flags = InfoGetList(keyFlags); if (!MatchSizes(keyFiles, keyFlags, files.size(), flags.size())) { diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 3461e67cffc672e1c692606e997441dbb8629c8f..caaa0a3594e019ead86531b4bdab4eb43a12a244 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -2375,7 +2375,8 @@ bool cmSystemTools::VersionCompare(cmSystemTools::CompareOp op, { const char* endl = lhss; const char* endr = rhss; - unsigned long lhs, rhs; + unsigned long lhs; + unsigned long rhs; while (((*endl >= '0') && (*endl <= '9')) || ((*endr >= '0') && (*endr <= '9'))) { diff --git a/Source/cmUseMangledMesaCommand.cxx b/Source/cmUseMangledMesaCommand.cxx index 43581947ce6cba67e82567f3e2268f33a5ca669f..2b553b05a7d79c8709b1846bdc3823af8f1a17ea 100644 --- a/Source/cmUseMangledMesaCommand.cxx +++ b/Source/cmUseMangledMesaCommand.cxx @@ -51,7 +51,8 @@ bool cmUseMangledMesaCommand::InitialPass(std::vector const& args, void cmUseMangledMesaCommand::CopyAndFullPathMesaHeader( const std::string& source, const std::string& outdir) { - std::string dir, file; + std::string dir; + std::string file; cmSystemTools::SplitProgramPath(source, dir, file); std::string outFile = outdir; outFile += "/"; diff --git a/Source/cmake.cxx b/Source/cmake.cxx index d03646788eeef3d7ce15cc5cdae0de86423b6249..794119a7d67a48382d0801249f9ef1bc41566af5 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -296,7 +296,8 @@ bool cmake::SetCacheArgs(const std::vector& args) return false; } } - std::string var, value; + std::string var; + std::string value; cmStateEnums::CacheEntryType type = cmStateEnums::UNINITIALIZED; if (cmState::ParseCacheEntry(entry, var, value, type)) { // The value is transformed if it is a filepath for example, so @@ -2092,7 +2093,8 @@ void cmake::UpdateConversionPathTable() ". CMake can not open file."); cmSystemTools::ReportLastSystemError("CMake can not open file."); } else { - std::string a, b; + std::string a; + std::string b; while (!table.eof()) { // two entries per line table >> a; diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index c35eff6ac864248ac6095b322b4bb0bf1bb68772..9f4bdda02e075aee39b197ab32db7b1fca0f365e 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -763,8 +763,10 @@ int cmcmd::ExecuteCMakeCommand(std::vector const& args) if (args[1] == "time" && args.size() > 2) { std::vector command(args.begin() + 2, args.end()); - clock_t clock_start, clock_finish; - time_t time_start, time_finish; + clock_t clock_start; + clock_t clock_finish; + time_t time_start; + time_t time_finish; time(&time_start); clock_start = clock();