Zero initialize publisher GID in subscription intra process callback (#1011)

This fixes a cppcheck error that was detected when including the rclcpp headers in rclcpp_action and rclcpp_lifecycle.
It is not clear to me why cppcheck does not report the unitialized member when testing rclcpp directly.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
This commit is contained in:
Jacob Perron 2020-03-03 09:28:20 -08:00 committed by GitHub
parent fffbe5972c
commit d48d4608e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -152,6 +152,7 @@ private:
execute_impl()
{
rmw_message_info_t msg_info;
msg_info.publisher_gid = {0, {0}};
msg_info.from_intra_process = true;
if (any_callback_.use_take_shared_method()) {