-
Notifications
You must be signed in to change notification settings - Fork 141
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: casting ints and check tcp endpoints #216
Conversation
Signed-off-by: Melvin He <[email protected]> Co-authored-by: Patrick M. Niedzielski <[email protected]>
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.
Hi @melvinhe! Thank you for the PR! The comments here are more complex since the changes are less trivial
Signed-off-by: Melvin He <[email protected]>
Signed-off-by: Melvin He <[email protected]>
@678098 Thanks for the detailed feedback; this really helps me write cleaner/scalable code and become a better (open source) engineer. I’ve updated your code suggestions in the most recent commit, which seems to be passing the test checks now. For future potential commits, I’ll just sync/fetch from main and create time stamped branches for each PR. |
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.
Hi @melvinhe, sorry for the delay.
I prepared a couple of comments, I think we can apply them and merge the PR soon.
Signed-off-by: Melvin He <[email protected]>
Signed-off-by: Melvin He <[email protected]>
Hi @678098, changes for handling '0' port values have been applied. Passing all tests except build for macosx_arm64, which seem to be unrelated to the committed code changes. |
…ests Signed-off-by: Melvin He <[email protected]>
…erg#216) Signed-off-by: Melvin He <[email protected]> Co-authored-by: Patrick M. Niedzielski <[email protected]> Co-authored-by: Evgeny Malygin <[email protected]>
…erg#216) Signed-off-by: Melvin He <[email protected]> Co-authored-by: Patrick M. Niedzielski <[email protected]> Co-authored-by: Evgeny Malygin <[email protected]>
…erg#216) Signed-off-by: Melvin He <[email protected]> Co-authored-by: Patrick M. Niedzielski <[email protected]> Co-authored-by: Evgeny Malygin <[email protected]>
…erg#216) Signed-off-by: Melvin He <[email protected]> Co-authored-by: Patrick M. Niedzielski <[email protected]> Co-authored-by: Evgeny Malygin <[email protected]>
*Issue number of the reported bug or feature request: #87 *
Describe your changes
Maintaining long value returned by 'strtol' and casts to int if port in reasonable range. The changed files diffs below show the changes in #214 possibly due to resetting my local wconv_fix to remote.
This particular PR deals with the following -Wconversion warnings that pollutes the build logs:
Testing performed
N/A
Additional context
Currently only checks that 'temp_port' is within reasonable INT range rather than being more fine grained regarding valid tcp port values. This is likely fine though as we previously did not do a fine-grained valid port checking here.