diff --git a/SilKit/IntegrationTests/ITest_SingleParticipant.cpp b/SilKit/IntegrationTests/ITest_SingleParticipant.cpp index 04dfbceec..2b3480323 100644 --- a/SilKit/IntegrationTests/ITest_SingleParticipant.cpp +++ b/SilKit/IntegrationTests/ITest_SingleParticipant.cpp @@ -82,7 +82,7 @@ class ITest_SingleParticipant : public testing::Test expectedData.resize(message.expectedData.size()); std::copy(message.expectedData.begin(), message.expectedData.end(), expectedData.begin()); - CanFrame msg; + CanFrame msg{}; msg.canId = 1; msg.dataField = expectedData; msg.dlc = static_cast(msg.dataField.size()); diff --git a/SilKit/IntegrationTests/ITest_ThreeCanController.cpp b/SilKit/IntegrationTests/ITest_ThreeCanController.cpp index 41e538041..3b61dbf5d 100644 --- a/SilKit/IntegrationTests/ITest_ThreeCanController.cpp +++ b/SilKit/IntegrationTests/ITest_ThreeCanController.cpp @@ -115,7 +115,7 @@ class ITest_ThreeCanController : public testing::Test expectedData.resize(message.expectedData.size()); std::copy(message.expectedData.begin(), message.expectedData.end(), expectedData.begin()); - CanFrame msg; + CanFrame msg{}; msg.canId = 1; msg.dataField = expectedData; msg.dlc = static_cast(msg.dataField.size()); diff --git a/SilKit/source/services/logging/MessageTracing.hpp b/SilKit/source/services/logging/MessageTracing.hpp index dde5b3b34..cb46a6fc4 100644 --- a/SilKit/source/services/logging/MessageTracing.hpp +++ b/SilKit/source/services/logging/MessageTracing.hpp @@ -24,10 +24,15 @@ void TraceMessageCommon(Logging::ILoggerInternal* logger, std::string_view keyString = {}, std::string_view valueString = {}) { - if constexpr (std::is_same_v) { // Don't trace LogMessages - this could cause cycles! + SILKIT_UNUSED_ARG(logger); + SILKIT_UNUSED_ARG(messageString); + SILKIT_UNUSED_ARG(addr); + SILKIT_UNUSED_ARG(msg); + SILKIT_UNUSED_ARG(keyString); + SILKIT_UNUSED_ARG(valueString); return; } else @@ -58,7 +63,9 @@ void TraceMessageCommon(Logging::ILoggerInternal* logger, } } } + } // namespace Detail + template void TraceRx(Logging::ILoggerInternal* logger, const Core::IServiceEndpoint* addr, const SilKitMessageT& msg, const Core::ServiceDescriptor& from) @@ -77,5 +84,6 @@ void TraceTx(Logging::ILoggerInternal* logger, const Core::IServiceEndpoint* add { Detail::TraceMessageCommon(logger, "Send targetted message", addr, msg, Logging::Keys::to, target); } + } // namespace Services } // namespace SilKit