Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename variable to fix name shadowing warning #929

Merged
merged 1 commit into from
Aug 2, 2021

Conversation

alsora
Copy link
Contributor

@alsora alsora commented Aug 2, 2021

Fixes the following warning

_ws/src/ros2/rcl/rcl_lifecycle/src/rcl_lifecycle.c:368:7: warning: declaration of 'ret' shadows a previous local [-Wshadow]
       RCL_SET_ERROR_MSG_WITH_FORMAT_STRING("Could not publish transition: %s", error_string.str);
       ^

_ws/src/ros2/rcl/rcl_lifecycle/src/rcl_lifecycle.c:363:15: note: shadowed declaration is here
     rcl_ret_t ret = rcl_lifecycle_com_interface_publish_notification(

_ws/src/ros2/rcl/rcl_lifecycle/src/default_state_machine.c:715:5: warning: declaration of 'ret' shadows a previous local [-Wshadow]
     RCL_SET_ERROR_MSG_WITH_FORMAT_STRING(
     ^
_ws/src/ros2/rcl/rcl_lifecycle/src/default_state_machine.c:660:13: note: shadowed declaration is here
   rcl_ret_t ret = RCL_RET_ERROR;

Signed-off-by: Alberto Soragna alberto.soragna@gmail.com

Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com>
@clalancette
Copy link
Contributor

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@clalancette clalancette merged commit b0e806c into ros2:master Aug 2, 2021
@alsora alsora deleted the asoragna/fix-shadow-var branch August 2, 2021 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants