From 239bac9879934aa7bc0f4c1f22a6730737c04c30 Mon Sep 17 00:00:00 2001 From: Tony Paulussen Date: Wed, 6 Dec 2023 13:25:19 +0100 Subject: [PATCH 1/2] fix: Rename scoped lock so it doesn't hide the outer lock triggering a compiler warning --- include/behaviortree_cpp/blackboard.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/behaviortree_cpp/blackboard.h b/include/behaviortree_cpp/blackboard.h index 934f3fb7b..d1b2fc509 100644 --- a/include/behaviortree_cpp/blackboard.h +++ b/include/behaviortree_cpp/blackboard.h @@ -143,7 +143,7 @@ class Blackboard // this is not the first time we set this entry, we need to check // if the type is the same or not. Entry& entry = *it->second; - std::scoped_lock lock(entry.entry_mutex); + std::scoped_lock scoped_lock(entry.entry_mutex); Any& previous_any = entry.value; From f47875d903e7874d981c78794fa3b444b48d442b Mon Sep 17 00:00:00 2001 From: Tony Paulussen Date: Wed, 6 Dec 2023 13:57:44 +0100 Subject: [PATCH 2/2] fix: guard macro declaration to prevent redefinition warning --- 3rdparty/minitrace/minitrace.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/3rdparty/minitrace/minitrace.cpp b/3rdparty/minitrace/minitrace.cpp index 6abf4e6d0..a3ac5f829 100644 --- a/3rdparty/minitrace/minitrace.cpp +++ b/3rdparty/minitrace/minitrace.cpp @@ -12,7 +12,9 @@ #ifdef _WIN32 #pragma warning (disable:4996) +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN +#endif #include #define __thread __declspec(thread) #define pthread_mutex_t CRITICAL_SECTION