Skip to content

🧑‍🌾 compiler warnings from ignored rmw_publish and rmw_take_event return values #290

Description

@miguelgonrod

Generated by Generative AI

No response

Operating System:

Ubuntu Resolute and rhel

ROS version or commit hash:

Rolling

RMW implementation (if applicable):

No response

RMW Configuration (if applicable):

No response

Client library (if applicable):

No response

'ros2 doctor --report' output

Steps to reproduce issue

  1. Go to any of the jobs listed below
  2. Build a job
  3. See warnings showing up

Expected behavior

To build without warnings

Actual behavior

Building with warnings

Additional information

Reference Builds

Log Output

--- stderr: test_rmw_implementation

/home/jenkins-agent/workspace/nightly_linux_repeated/ws/src/ros2/rmw_implementation/test_rmw_implementation/test/test_event_message_lost_deadlock.cpp:148:26:
warning: ignoring return value of ‘rmw_ret_t rmw_publish(const rmw_publisher_t*, const void*, rmw_publisher_allocation_t*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  148 |         (void)rmw_publish(pub, &msg, nullptr);
      |               ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~

/home/jenkins-agent/workspace/nightly_linux_repeated/ws/src/ros2/rmw_implementation/test_rmw_implementation/test/test_event_message_lost_deadlock.cpp:159:29:
warning: ignoring return value of ‘rmw_ret_t rmw_take_event(const rmw_event_t*, void*, bool*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  159 |         (void)rmw_take_event(&event, &status, &taken);
      |               ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~

---

Finished <<< test_rmw_implementation [1min 32s]

Began to happen in https://ci.ros2.org/job/nightly_linux_repeated/4389. Probably caused by #278

CC: @Crola1702

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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