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

[Dashing] Fix conversion of negative durations to messages #1234

Conversation

ivanpauno
Copy link
Member

Backports #1188.

I will run CI before merging, as I've solved a bunch of conflicts in the middle.

* Fix conversion from negative Duration or Time to the respective message type and throw in Duration::to_rmw_time() if the duration is negative.
rmw_time_t cannot represent negative durations.

Constructors and assignment operators can be just defaulted.

Other changes are mainly cosmetical, to make conversions between signed
and unsigned types and between 32-bit and 64-bit types more explicit.

Signed-off-by: Johannes Meyer <[email protected]>

* Add -Wconversion compiler option and fix implicit conversions that might alter the value

Signed-off-by: Johannes Meyer <[email protected]>

* Fix usage of fixture class in some unit tests by using gtest macro TEST_F() instead of TEST().

Signed-off-by: Johannes Meyer <[email protected]>

* Add compiler option -Wno-sign-conversion to fix build with Clang on macOS

Signed-off-by: Johannes Meyer <[email protected]>
@ivanpauno ivanpauno added bug Something isn't working in review Waiting for review (Kanban column) labels Jul 20, 2020
@ivanpauno ivanpauno self-assigned this Jul 20, 2020
@hidmic
Copy link
Contributor

hidmic commented Jul 21, 2020

Duplicate of #1207? I'm awful at labeling these tickets.

@ivanpauno
Copy link
Member Author

Duplicate of #1207? I'm awful at labeling these tickets.

I forgot that I reviewed that one.
There wasn't a link to the original PR and the backport wasn't part of the dashing patch release board, so I didn't realize.

@ivanpauno ivanpauno closed this Jul 21, 2020
@clalancette clalancette deleted the ivanpauno/dashing/fix/time-duration-conversion-to-msg branch January 15, 2021 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in review Waiting for review (Kanban column)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants