summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--icetray/icetray/logWriterConsole.cpp7
-rw-r--r--icetray/icetray/logger.cpp1
-rw-r--r--icetray/tool/icetraySql.cpp1
-rw-r--r--icetray/unittests/Jamfile.jam5
-rw-r--r--icetray/unittests/testIceTrayServiceI.cpp2
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<typename ... Pn>
- 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<std::string> 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 : : : : <include>/usr/include/dbpp-postgresql ;
path-constant me : . ;
+project
+ : requirements
+ <toolset>tidy:<xcheckxx>misc-non-private-member-variables-in-classes
+ ;
+
alias testCommon : : : :
<define>ROOT=\"$(me)\"
<library>..//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<Ice::Short>(1);
fetchTest<Ice::Int>(100000);
fetchTest<Ice::Long>(10000000);
- fetchTest<Ice::Float>(0.1f);
+ fetchTest<Ice::Float>(0.1F);
fetchTest<Ice::Double>(3.14);
fetchTest<std::string>("some string");
fetchTest<unsigned long>(20000000);