-
Notifications
You must be signed in to change notification settings - Fork 201
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
Handle implicity conversions #496
Conversation
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 very much for working on this, this is tedious work!
I left a bunch of remarks inline that need clarification. Furthermore, I think we should try compiling this branch on some additional architectures (i386, armhf, s390x, maybe more from Debian buildd?) to make sure it does not trigger any side-effects of types having different size on non-64bit architectures.
This flag will make the compiler to issue a warning for all the dangerous implicit type conversions.
wifi_get_freq24 and wifi_get_freq5 are used with ap->channel values, which are guint. Change these functions to take guint as argument.
94de4cf
to
06f72a0
Compare
Here we probably should make _netplan_state_get_vf_count_for_def return a unsigned int, but as it is a public interface (even though only used inside netplan) I'll add some safety checks and cast the return value to int.
06f72a0
to
b56f5f8
Compare
Thanks Lukas. I think I addressed your comments. In particular, there was a problem with 32-bit. It happened on armhf. I added the compiler error to one of my replies. I created a package from this branch and tested it with autopkgtest on all the archs supported by Ubuntu and it looks good. |
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.
Thanks a lot for addressing my remarks, the deep investigations and running those extra cross-architecture tests!
LGTM! I left one tiny inline comment, but I think it's fine to be merged as-is.
Description
Fix some type conversions and make some implicit conversions explicit.
It's a requirement to add the TIOBE analysis to our CI as it will build the project with
-Wconversion
.I'd recommend to use interactive rebase to step through each commit individually starting from the first one and call
meson compile
with-j1
so you can see what compiler errors each commit fixes. I didn't want to paste the error to the commit messages...Checklist
make check
successfully.make check-coverage
).