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

[20517] Force usage of semicolon in FASTDDS_TODO_BEFORE macro #4452

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

EduPonz
Copy link

@EduPonz EduPonz commented Feb 26, 2024

Description

Up until this PR, the FASTDDS_TODO_BEFORE macro added a semicolon after its static_assert. This means that when using the macro, if a semicolon is added, a second semicolon ends up on the source after pre-processing, which can result in a compiler warning because of that extra semicolon. This PR:

  • Removes the semicolon from the static assert within the FASTDDS_TODO_BEFORE macro so that the use of semicolon upon usage is enforced.
  • Updates all the usages to add a semicolon.

Contributor Checklist

  • Commit messages follow the project guidelines.
  • The code follows the style guidelines of this project.
  • N/A: Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally
  • N/A: Any new/modified methods have been properly documented using Doxygen.
  • N/A: Changes are ABI compatible.
  • N/A: Changes are API compatible.
  • N/A: New feature has been added to the versions.md file (if applicable).
  • N/A: New feature has been documented/Current behavior is correctly described in the documentation.
  • N/A: Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • The title and description correctly express the PR's purpose.
  • Check contributor checklist is correct.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

@EduPonz EduPonz added the no-test Skip CI tests if PR marked with this label label Feb 26, 2024
@EduPonz EduPonz added this to the v2.14.0 milestone Feb 26, 2024
@EduPonz
Copy link
Author

EduPonz commented Feb 26, 2024

@richiprosima please test this

Copy link
Contributor

@JesusPoderoso JesusPoderoso left a comment

Choose a reason for hiding this comment

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

LGTM

@EduPonz EduPonz merged commit 7a6295f into master Feb 27, 2024
14 of 15 checks passed
@EduPonz EduPonz deleted the hotfix/fastdds_todo_before_macro branch February 27, 2024 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-test Skip CI tests if PR marked with this label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants