-
Notifications
You must be signed in to change notification settings - Fork 139
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
Fix 'Wconversion' warns: static casting doubles #212
Conversation
Signed-off-by: Melvin He <[email protected]>
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.
🎉
@melvinhe, could you run clang-format on these changes? Everything looks good except for a failing format check on our CI.
Signed-off-by: Melvin He <[email protected]>
Signed-off-by: Evgeny Malygin <[email protected]>
Signed-off-by: Evgeny Malygin <[email protected]>
Signed-off-by: Evgeny Malygin <[email protected]>
@pniedzielski Thanks, just ran the format check with clang-format for the CI. See: Fix 'Wconversion' warns: static casting doubles #214 |
@melvinhe Thanks! Formatting checks pass now, but I think you had an issue with rebasing, since you've recommitted some changes that were merged into If you're not confident with these git operations, I can walk you through it. |
@pniedzielski Sure, after seeing the 3 recent commits added recently, I updated my forked repo main branch to be up to date with bloomberg/blazingmq:main. Since my old 'wconversion_fix' branch was causing issues when merging, I created a new 'wconv_fix' branch from my local main, manually made my previous casting and formatting edits, and pushed & made a new PR. I realize now that this may be more of a roundabout way of doing things, but the new PR seems to be passing all the Tests other than the integration test that a different commit broke: #214 Should I just deal with the 'wconv_fix' branch than and get rid of my old 'wconversion_fix' branch? Or how else should I remedy this. Thanks! |
*Issue number of the reported bug or feature request: #87 *
Describe your changes
This is a small
good first issue
contribution to fix -Wconversion warnings that pollutes the build log.This particular PR deals with the following warnings:
Testing performed
N/A
Additional context
Converting from
BloombergLP::bsls::Types::Int64
(a 64-bit integer) todouble
(a 64-bit floating-point) can potentially lead to a loss of precision, but it depends on the size of the integer value used in this context. The division involving anotherdouble
should already result in similar loss of precision though, so this may be fine. Please check this before merging.