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
Fixed many compiler warning about sign and size mismatch #509
Conversation
seanm
commented
Dec 16, 2018
- added various casts
- assed some asserts where the casts made assumptions
- enabled additional warnings in Xcode project
I would prefer to have:
|
I didn't really fix any 'issue', I just enabled some warning flags in the Xcode project (Xcode/common.xcconfig) and fixed them. Not sure what kind of granularity you think'd be best... do you find it too big to review? |
Without the compiler warnings I can't tell if the change is correct or needed. Maybe another libusb maintainer will accept your patch as-is. |
@LudovicRousseau That seems reasonable. I think he could put them all in one commit if the warnings are all in the commit message. Might get a little messy though. Maybe break it down by component (darwin, io, etc). |
I want this all for the next release for sure though. There is no rush. I was going to see about cutting an rc next week sometime. |
Well, the warning messages I can create for you just by checking out master and building, here you go: from clang -Wshorten-64-to-32
from cppcheck
I can amend the commit message with that if you'd like. |
- added various casts - added some asserts where the casts made assumptions - enabled additional warnings in Xcode project (especially -Wshorten-64-to-32)
@hjelmn @LudovicRousseau I've fixed the merge conflicts... |
Thanks @seanm. I plan to do another batch this weekend with the hope of getting a release out before the end of the month. |
- added various casts - added some asserts where the casts made assumptions - enabled additional warnings in Xcode project (especially -Wshorten-64-to-32) Closes libusb#509 Signed-off-by: Nathan Hjelm <hjelmn@me.com>