-
Notifications
You must be signed in to change notification settings - Fork 101
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
update cast to modern style #418
Conversation
Signed-off-by: Mario Prats <marioprats@gmail.com>
0e1b93d
to
e430ffb
Compare
What if a C library uses to suppress warnings makes sense. What about checking the
|
Ah, yeah i think it does not, for example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot take this. This is meant to be a C header, includable and usable by both C and C++. So the code is correct as-is.
@marioprats Can you give more details on what problems this is causing you? |
I noticed this was triggering warnings in some packages downstream and thought I could fix it at the source. Didn't realize this is a C library. |
Signed-off-by: Mario Prats <marioprats@gmail.com>
Here's one example of a warning while building moveit2:
The warning is triggered by the THROTTLE macros in rcutils with the C-style cast, when used from rclcpp (logging.hpp) in C++. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides the stylistic thing, I think this should be OK.
Could you add the prefix |
Signed-off-by: Mario Prats <marioprats@gmail.com>
Added the RCUTILS_ prefix |
Could we add this change to humble? |
@Mergifyio backport iron humble |
✅ Backports have been created
|
* update cast to modern style Signed-off-by: Mario Prats <marioprats@gmail.com> (cherry picked from commit 5bd1230)
A minor update of an old-style cast to suppress warnings downstream.