Skip to content

🧑‍🌾 Rci__nightly-release 3 clang and cmake warnings by an uninitialized static_peer #558

@miguelgonrod

Description

@miguelgonrod

Generated by Generative AI

No response

Operating System:

Ubuntu 24.04

ROS version or commit hash:

Rolling

RMW implementation (if applicable):

rmw_cyclonedds_cpp

RMW Configuration (if applicable):

No response

Client library (if applicable):

No response

'ros2 doctor --report' output

No response

Steps to reproduce issue

  1. Go to http://build.ros2.org/job/Rci__nightly-release_ubuntu_noble_amd64
  2. Build a Job
  3. See the warning

Expected behavior

To build without warnings

Actual behavior

Building with warnings

Additional information

Reference Build

Log Output

rmw_node.cpp:1184:

07:02:31     inlined from ‘rmw_ret_t rmw_context_impl_s::init(rmw_init_options_t*, std::size_t)’ at /tmp/ws/src/ros2/rmw_cyclonedds/rmw_cyclonedds_cpp/src/rmw_node.cpp:1380:27:
07:02:31 /tmp/ws/src/ros2/rmw_cyclonedds/rmw_cyclonedds_cpp/src/rmw_node.cpp:1184:36: warning: ‘add_localhost_as_static_peer’ may be used uninitialized [-Wmaybe-uninitialized]
07:02:31  1184 |       add_localhost_as_static_peer ||
07:02:31       |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
07:02:31  1185 |       add_static_peers ||
07:02:31       |       ~~~~~~~~~~~~~~~~              
07:02:31 /tmp/ws/src/ros2/rmw_cyclonedds/rmw_cyclonedds_cpp/src/rmw_node.cpp: In member function ‘rmw_ret_t rmw_context_impl_s::init(rmw_init_options_t*, std::size_t)’:
07:02:31 /tmp/ws/src/ros2/rmw_cyclonedds/rmw_cyclonedds_cpp/src/rmw_node.cpp:1134:10: note: ‘add_localhost_as_static_peer’ was declared here
07:02:31  1134 |     bool add_localhost_as_static_peer;
07:02:31       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Apparently this started when rolling builds were down, first appearance is https://build.ros2.org/job/Rci__nightly-release_ubuntu_noble_amd64/675/

CC: @Crola1702

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions