-
Notifications
You must be signed in to change notification settings - Fork 142
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: bmqp protocol Wconv warns #257
Conversation
Signed-off-by: Melvin He <[email protected]>
Signed-off-by: Melvin He <[email protected]>
Signed-off-by: Melvin He <[email protected]>
Signed-off-by: Melvin He <[email protected]>
@pniedzielski A lot of other functions and dependencies reference these 'bmqp_protocol' files. So these changes, after running these adjustments through the CI, surprisingly reduced over 8,000 occurrences of '-Wconversion' (from 12,238 down to 3,848)! |
Nice catch @melvinhe! |
@pniedzielski @678098 The changes in this commit seem to be fine and ready to merge soon, but feel free to take a look or sanity check. Most of these edits just deal with relatively simple data types, so the changes shouldn't really change core code functionality (other than removing a boat-load of build logs). Besides 'Tests / IT [multi/fsm_mode]' which seem to be due to recent ubuntu changes rather than this PR, the CI checks seem to pass. |
@melvinhe Some of these are a touch more involved, so I will look at it again tomorrow morning, but it looks good to me! Probably will be able to merge tomorrow. |
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.
Thank you!
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.
Sorry see above changes.
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.
@pniedzielski confirming that CI checks passed after removing the nested cast. We're now down to 1,625 and 2,513 in docker & ubuntu builds respectively (from tens of thousands originally)!
Signed-off-by: Melvin He <[email protected]>
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.
Sorry see above changes.
Changes Resolved
Signed-off-by: Melvin He <[email protected]> Signed-off-by: Patrick M. Niedzielski <[email protected]>
Signed-off-by: Melvin He <[email protected]> Signed-off-by: Patrick M. Niedzielski <[email protected]>
Signed-off-by: Melvin He <[email protected]> Signed-off-by: Patrick M. Niedzielski <[email protected]>
*Issue number of the reported bug or feature request: #87 *
Describe your changes
This PR attempts to fix all current -Wconversion warnings caused by faulty error checks, data type inconsistencies, and potential overflow/truncation data loss in ‘bmqp_protocol.cpp‘ as well as associated header and test files.
It should also clear out over a dozen errors that lead to at least 100 ‘-Wconversion‘ warnings in the BlazingMQ build logs such as, but limited to, the following:
Testing performed
Ran through the CI's unit, formatting, and integration tests.
Additional context
Mainly casting to fix data type inconsistencies in my first diffs for this PR to start with a solution that is least invasive. Several cases may need additions like a precondition check, adjusting function signature, or changing a data type, although most changes seem to be fine after further review. I also left a few individual comments on noteworthy diffs.