Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions distros/humble/pkg_additional_info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ cartographer_ros:
build_number: 26 # offline_node.cpp out of the shared library (duplicate gflags abort)
moveit_core: # bullet rosdep mapped to bullet-cpp (no pybullet)
build_number: 26
rclcpp: # avoid GCC 15 -Werror=uninitialized in MessageMemoryStrategy::create_default()
build_number: 26
rtabmap:
additional_cmake_args:
if: win
Expand Down
2 changes: 2 additions & 0 deletions distros/jazzy/pkg_additional_info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ gz_physics_vendor: # bullet rosdep mapped to bullet-cpp (no pybullet)
build_number: 32
moveit_core: # bullet rosdep mapped to bullet-cpp (no pybullet)
build_number: 32
rclcpp: # avoid GCC 15 -Werror=uninitialized in MessageMemoryStrategy::create_default()
build_number: 32
rmf_utils: # its DLL moved from lib to bin (Windows)
build_number: 32
tf2_bullet: # bullet rosdep mapped to bullet-cpp (no pybullet)
Expand Down
20 changes: 20 additions & 0 deletions distros/lyrical/patch/ros2-rclcpp.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Avoid unnecessary std::make_shared<std::allocator<void>>() in
# MessageMemoryStrategy::create_default(), which triggers a GCC 15
# -Werror=uninitialized false positive in downstream packages.
diff --git a/include/rclcpp/message_memory_strategy.hpp b/include/rclcpp/message_memory_strategy.hpp
index 1111111..2222222 100644
--- a/include/rclcpp/message_memory_strategy.hpp
+++ b/include/rclcpp/message_memory_strategy.hpp
@@ -88,7 +88,11 @@ public:
/// Default factory method
static SharedPtr create_default()
{
- return std::make_shared<MessageMemoryStrategy<MessageT, Alloc>>(std::make_shared<Alloc>());
+ if constexpr (std::is_same_v<Alloc, std::allocator<void>>) {
+ return std::make_shared<MessageMemoryStrategy<MessageT, Alloc>>();
+ } else {
+ return std::make_shared<MessageMemoryStrategy<MessageT, Alloc>>(std::make_shared<Alloc>());
+ }
}

/// By default, dynamically allocate a new message.
2 changes: 2 additions & 0 deletions distros/lyrical/pkg_additional_info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ mrpt_gui:
build_number: 34
nav2_rviz_plugins:
build_number: 31
rclcpp: # avoid GCC 15 -Werror=uninitialized in MessageMemoryStrategy::create_default()
build_number: 31
rmf_fleet_adapter: # its DLL moved to bin (Windows)
build_number: 31
rmf_fleet_adapter_python: # rmf_adapter as a Python MODULE (shared patch)
Expand Down
2 changes: 2 additions & 0 deletions distros/rolling/pkg_additional_info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ moveit_task_constructor_visualization:
build_number: 33
mrpt_gui:
build_number: 35
rclcpp: # avoid GCC 15 -Werror=uninitialized in MessageMemoryStrategy::create_default()
build_number: 33
rmf_fleet_adapter: # its DLL moved to bin (Windows)
build_number: 33
rmf_fleet_adapter_python: # rmf_adapter as a Python MODULE (shared patch)
Expand Down
20 changes: 20 additions & 0 deletions shared/patch/ros2-rclcpp.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Avoid unnecessary std::make_shared<std::allocator<void>>() in
# MessageMemoryStrategy::create_default(), which triggers a GCC 15
# -Werror=uninitialized false positive in downstream packages.
diff --git a/include/rclcpp/message_memory_strategy.hpp b/include/rclcpp/message_memory_strategy.hpp
index 1111111..2222222 100644
--- a/include/rclcpp/message_memory_strategy.hpp
+++ b/include/rclcpp/message_memory_strategy.hpp
@@ -88,7 +88,11 @@ public:
/// Default factory method
static SharedPtr create_default()
{
- return std::make_shared<MessageMemoryStrategy<MessageT, Alloc>>(std::make_shared<Alloc>());
+ if constexpr (std::is_same_v<Alloc, std::allocator<void>>) {
+ return std::make_shared<MessageMemoryStrategy<MessageT, Alloc>>();
+ } else {
+ return std::make_shared<MessageMemoryStrategy<MessageT, Alloc>>(std::make_shared<Alloc>());
+ }
}

/// By default, dynamically allocate a new message.
Loading