From d61d2f00a863905c1cf5990492d36d9235760c15 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 30 Mar 2019 12:35:28 +0000 Subject: Tidy fixes for latest clang --- icetray/icetray/logWriterConsole.cpp | 7 ++++--- icetray/icetray/logger.cpp | 1 + icetray/tool/icetraySql.cpp | 1 + icetray/unittests/Jamfile.jam | 5 +++++ icetray/unittests/testIceTrayServiceI.cpp | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/icetray/icetray/logWriterConsole.cpp b/icetray/icetray/logWriterConsole.cpp index 23c1279..11d9a16 100644 --- a/icetray/icetray/logWriterConsole.cpp +++ b/icetray/icetray/logWriterConsole.cpp @@ -7,7 +7,7 @@ namespace AdHoc { AdHocFormatter(DomainFmt, ".%?"); StreamWriterT('d') { template - static void write(stream & s, int width, const IceTray::Logging::Domain & domain, const Pn & ... pn) + static void write(stream & s, ssize_t width, const IceTray::Logging::Domain & domain, const Pn & ... pn) { auto di = domain.begin(); if (di == domain.end()) { @@ -21,9 +21,9 @@ namespace AdHoc { } } else { - int target = width; + auto target = width; while (di != domain.end()) { - int total = di == domain.begin() ? -1 : 0; + auto total = di == domain.begin() ? -1 : 0; for (auto dic = di; dic != domain.end(); dic++) { total += 1 + dic->length(); } @@ -55,6 +55,7 @@ namespace AdHoc { }; } +// NOLINTNEXTLINE(modernize-concat-nested-namespaces) namespace IceTray { namespace Logging { AdHocFormatter(LogMsg, "%?: %d: %?\n"); diff --git a/icetray/icetray/logger.cpp b/icetray/icetray/logger.cpp index 9f699e3..6ceff96 100644 --- a/icetray/icetray/logger.cpp +++ b/icetray/icetray/logger.cpp @@ -12,6 +12,7 @@ INSTANTIATEFACTORY(IceTray::Logging::LogWriter, const Ice::PropertiesPtr &); template class ::AdHoc::GlobalStatic<::IceTray::Logging::LogManager>; +// NOLINTNEXTLINE(modernize-concat-nested-namespaces) namespace IceTray { namespace Logging { LoggerBase::LoggerBase(Domain domain) : diff --git a/icetray/tool/icetraySql.cpp b/icetray/tool/icetraySql.cpp index 2b9a5ff..bc87f58 100644 --- a/icetray/tool/icetraySql.cpp +++ b/icetray/tool/icetraySql.cpp @@ -67,6 +67,7 @@ main(int argc, char ** argv) po::notify(vm); std::vector sqlnsparts; + // NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) boost::algorithm::split(sqlnsparts, sqlns, boost::algorithm::is_any_of(":"), boost::algorithm::token_compress_on); auto r = fs::canonical(sql).lexically_relative(fs::canonical(base)).parent_path(); if (!r.empty()) { diff --git a/icetray/unittests/Jamfile.jam b/icetray/unittests/Jamfile.jam index 67ffc0a..7486d04 100644 --- a/icetray/unittests/Jamfile.jam +++ b/icetray/unittests/Jamfile.jam @@ -10,6 +10,11 @@ lib dbpp-postgresql : : : : /usr/include/dbpp-postgresql ; path-constant me : . ; +project + : requirements + tidy:misc-non-private-member-variables-in-classes + ; + alias testCommon : : : : ROOT=\"$(me)\" ..//adhocutil diff --git a/icetray/unittests/testIceTrayServiceI.cpp b/icetray/unittests/testIceTrayServiceI.cpp index c4b8331..09c2ac6 100644 --- a/icetray/unittests/testIceTrayServiceI.cpp +++ b/icetray/unittests/testIceTrayServiceI.cpp @@ -44,7 +44,7 @@ namespace TestIceTray { fetchTest(1); fetchTest(100000); fetchTest(10000000); - fetchTest(0.1f); + fetchTest(0.1F); fetchTest(3.14); fetchTest("some string"); fetchTest(20000000); -- cgit v1.2.3