-
Notifications
You must be signed in to change notification settings - Fork 153
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
Use ptrdiff_t for pointer-difference types #232
Conversation
This fixes warnings on msvc in several places: md4c.c(3087): warning C4244: 'function': conversion from '__int64' to 'int', possible loss of data
I hope it's portable enough. https://stackoverflow.com/questions/3597743/where-is-ptrdiff-t-defined-in-c We'll find out soon enough on Qt's CI: https://codereview.qt-project.org/c/qt/qtbase/+/534446 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #232 +/- ##
=======================================
Coverage 91.80% 91.81%
=======================================
Files 5 5
Lines 3406 3408 +2
=======================================
+ Hits 3127 3129 +2
Misses 279 279 ☔ View full report in Codecov by Sentry. |
* Use consistently type MD_SIZE for line indeces. * Remove pointer arithmetics if lines and replace it with line index arithmetics. This resolves some warnigns in MSVC builds. See PR #232.
* Use consistently type MD_SIZE for line indeces. * Remove pointer arithmetics if lines and replace it with line index arithmetics. This resolves some warnigns in MSVC builds. See PR #232. Co-authored-by: Shawn Rutledge <[email protected]>
* Use consistently type MD_SIZE for line indeces. * Remove pointer arithmetic if lines and replace it with line index arithmetic. This resolves some warnings in MSVC builds. See PR #232. Co-authored-by: Shawn Rutledge <[email protected]>
* Use consistently type MD_SIZE for line indeces. * Remove pointer arithmetic if lines and replace it with line index arithmetic. This resolves some warnings in MSVC builds. See PR #232. Co-authored-by: Martin Mitas <[email protected]> Co-authored-by: Shawn Rutledge <[email protected]>
Thanks for it. However I have to admit I dislike the patch because it now uses I've created an alternative patch based on this, if youre ok with it. See PR #233. |
* Use consistently type MD_SIZE for line indeces. * Remove pointer arithmetic if lines and replace it with line index arithmetic. This resolves some warnings in MSVC builds. See PR #232. Co-authored-by: Martin Mitas <[email protected]> Co-authored-by: Shawn Rutledge <[email protected]>
* Use consistently type MD_SIZE for line indeces. * Remove pointer arithmetic if lines and replace it with line index arithmetic. This resolves some warnings in MSVC builds. See PR #232. Co-authored-by: Martin Mitas <[email protected]> Co-authored-by: Shawn Rutledge <[email protected]>
* Use consistently type MD_SIZE for line indeces. * Remove pointer arithmetic if lines and replace it with line index arithmetic. This resolves some warnings in MSVC builds. See PR #232. Co-authored-by: Martin Mitas <[email protected]> Co-authored-by: Shawn Rutledge <[email protected]>
Closing, as the #233 was merged instead. |
This fixes warnings on msvc in several places:
md4c.c(3087): warning C4244: 'function': conversion from '__int64' to 'int', possible loss of data