From 91c29c3504d57fd61d5732c1088e657aa756ed73 Mon Sep 17 00:00:00 2001 From: Emanuele Danovaro Date: Wed, 17 Jul 2024 15:14:31 +0100 Subject: [PATCH] version bump --- VERSION | 2 +- src/eckit/log/CodeLocation.cc | 4 ++-- src/eckit/testing/Test.h | 8 ++++---- src/eckit/thread/ThreadSingleton.h | 1 + 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/VERSION b/VERSION index f8f738140..ea0928ced 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.26.3 +1.26.4 diff --git a/src/eckit/log/CodeLocation.cc b/src/eckit/log/CodeLocation.cc index 50307561b..f6384ccdc 100644 --- a/src/eckit/log/CodeLocation.cc +++ b/src/eckit/log/CodeLocation.cc @@ -34,8 +34,8 @@ CodeLocation::operator bool() const { void CodeLocation::print(std::ostream& os) const { if (file_) { - os << " (" << file_ << " +" << line_; - if (func_ && ::strlen(func_)) { + os << " (" << file_ << ":" << line_; + if (func_ && ::strlen(func_) > 0) { os << " " << func_; } os << ")"; diff --git a/src/eckit/testing/Test.h b/src/eckit/testing/Test.h index 23bf9d4bb..da725534c 100644 --- a/src/eckit/testing/Test.h +++ b/src/eckit/testing/Test.h @@ -453,20 +453,20 @@ int run_tests(int argc, char* argv[], bool initEckitMain = true) { #define EXPECT_MSG(expr, msg_callback) \ do { \ if (!(expr)) { \ - auto msg = msg_callback; \ - msg(); \ + auto _msg = msg_callback; \ + _msg(); \ throw eckit::testing::TestException("Condition failed: " #expr, Here()); \ } \ } while (false) #define EXPECT_EQUAL(a, b) \ - EXPECT_MSG(a == b, [=]() { \ + EXPECT_MSG(a == b, [&]() { \ std::cerr << eckit::Colour::red << "FAILED " << #a " == " << #b << " evaluated as [" << a << "] == [" << b \ << "]" << eckit::Colour::reset << std::endl; \ };) #define EXPECT_NOT_EQUAL(a, b) \ - EXPECT_MSG(a != b, [=]() { \ + EXPECT_MSG(a != b, [&]() { \ std::cerr << eckit::Colour::red << "FAILED " << #a " != " << #b << " evaluated as [" << a << "] != [" << b \ << "]" << eckit::Colour::reset << std::endl; \ };) diff --git a/src/eckit/thread/ThreadSingleton.h b/src/eckit/thread/ThreadSingleton.h index 18ce0f0dd..3fa317e23 100644 --- a/src/eckit/thread/ThreadSingleton.h +++ b/src/eckit/thread/ThreadSingleton.h @@ -83,6 +83,7 @@ ThreadSingleton::~ThreadSingleton() { T* value = (T*)::pthread_getspecific(key_); if (value) { ::pthread_key_delete(key_); + once_ = PTHREAD_ONCE_INIT; delete value; } }