Skip to content

🧑‍🌾 MessageReceiver fragmentStartingNum may be uninitialized warning #6169

@miguelgonrod

Description

@miguelgonrod

Is there an already existing issue for this?

  • I have searched the existing issues

Expected behavior

In builds: Jci__nightly-connext_ubuntu_noble_amd64 and Hci__nightly-connext_ubuntu_jammy_amd64 to build without warnings

Current behavior

Both builds are building with gcc warning related to fragmentStartingNum

Steps to reproduce

Fast DDS version/commit

Jazzy:

  eProsima/Fast-DDS:
    type: git
    url: https://github.com/eProsima/Fast-DDS.git
    version: 2.14.x

Humble:

  eProsima/Fast-DDS:
    type: git
    url: https://github.com/eProsima/Fast-DDS.git
    version: 2.6.x

Platform/Architecture

Ubuntu Focal 20.04 amd64, Other. Please specify in Additional context section.

Transport layer

Default configuration, UDPv4 & SHM

Additional context

Failing in Ubuntu Jammy (with ROS Humble) and in Ubuntu Noble (With ROS Jazzy)

XML configuration file

Relevant log output

For Humble:

--- stderr: fastrtps
/tmp/ws/src/eProsima/Fast-DDS/src/cpp/rtps/messages/MessageReceiver.cpp: In member function ‘bool eprosima::fastrtps::rtps::MessageReceiver::proc_Submsg_DataFrag(eprosima::fastrtps::rtps::CDRMessage_t*, eprosima::fastrtps::rtps::SubmessageHeader_t*, bool) const’:
/tmp/ws/src/eProsima/Fast-DDS/src/cpp/rtps/messages/MessageReceiver.cpp:947:14: warning: ‘fragmentStartingNum’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  947 |     uint32_t fragmentStartingNum;
      |              ^~~~~~~~~~~~~~~~~~~

For Jazzy:

--- stderr: fastrtps
/tmp/ws/src/eProsima/Fast-DDS/src/cpp/rtps/messages/MessageReceiver.cpp: In member function ‘bool eprosima::fastrtps::rtps::MessageReceiver::proc_Submsg_DataFrag(eprosima::fastrtps::rtps::CDRMessage_t*, eprosima::fastrtps::rtps::SubmessageHeader_t*, bool) const’:
/tmp/ws/src/eProsima/Fast-DDS/src/cpp/rtps/messages/MessageReceiver.cpp:998:14: warning: ‘fragmentStartingNum’ may be used uninitialized [-Wmaybe-uninitialized]
  998 |     uint32_t fragmentStartingNum;
      |              ^~~~~~~~~~~~~~~~~~~
---

Network traffic capture

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions