Skip to content

Unused variable warning when compiling in RelWithDebInfo #15

@gerkey

Description

@gerkey

The problem is that the variable is only referenced inside an assert(), which is presumably being compiled out under RelWithDebInfo.

Building C object CMakeFiles/rcl__rmw_opensplice_cpp.dir/src/rcl/timer.c.o
/home/gerkey/ros2_ws/src/ros2/rcl/rcl/src/rcl/wait.c: In function ‘__wait_set_clean_up’:
/home/gerkey/ros2_ws/src/ros2/rcl/rcl/src/rcl/wait.c:66:13: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
   rcl_ret_t ret;
             ^
/home/gerkey/ros2_ws/src/ros2/rcl/rcl/src/rcl/wait.c: In function ‘rcl_wait’:
/home/gerkey/ros2_ws/src/ros2/rcl/rcl/src/rcl/wait.c:431:15: warning: variable ‘rcl_ret’ set but not used [-Wunused-but-set-variable]
     rcl_ret_t rcl_ret;
               ^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions