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

Avoid redundant declarations in generated code for services and actions #102

Merged

Conversation

emersonknapp
Copy link
Contributor

Fixes #28

The typesupport code generation forward-declares used functions for the types of message member variables. However, for Services and Actions, these types' functions are already defined in the same source file, so the forward-declaration is redundant and raises a warning if -Wredundant-decls is enabled.

This patch fixes the redundant declarations, and adds the -Wredundant-decls compiler flag to catch it in the future

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me with green CI.

@emersonknapp
Copy link
Contributor Author

emersonknapp commented Jun 6, 2023

@emersonknapp
Copy link
Contributor Author

emersonknapp commented Jun 6, 2023

Rerunning aarch64 Build Status

@clalancette clalancette merged commit 9c09ae8 into ros2:rolling Jun 7, 2023
3 checks passed
@emersonknapp
Copy link
Contributor Author

@Mergifyio backport iron humble

@mergify
Copy link

mergify bot commented Jun 7, 2023

backport iron humble

❌ Command disallowed due to command restrictions in the Mergify configuration.

  • sender-permission>=write

@quarkytale
Copy link

@Mergifyio backport iron humble

@mergify
Copy link

mergify bot commented Jun 8, 2023

backport iron humble

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jun 8, 2023
…ns (#102)

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
(cherry picked from commit 9c09ae8)
mergify bot pushed a commit that referenced this pull request Jun 8, 2023
…ns (#102)

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
(cherry picked from commit 9c09ae8)

# Conflicts:
#	rosidl_typesupport_fastrtps_cpp/resource/srv__type_support.cpp.em
clalancette pushed a commit that referenced this pull request Jun 27, 2023
…ns (backport #102) (#104)

* Avoid redundant declarations in generated code for services and actions (#102)

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
(cherry picked from commit 9c09ae8)
clalancette pushed a commit that referenced this pull request Jun 27, 2023
…ns (#102) (#103)

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
(cherry picked from commit 9c09ae8)

Co-authored-by: Emerson Knapp <537409+emersonknapp@users.noreply.github.com>
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.

rosidl generates redundant declarations
3 participants