-
Notifications
You must be signed in to change notification settings - Fork 1k
Fix fread segfault from faulty assumption on compilers #7200
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
Conversation
|
Generated via commit e850ac1 Download link for the artifact containing the test results: ↓ atime-results.zip
|
|
thanks! would you mind (1) adding a helpful comment for any intrepid future devs that have the same thoughts about making it const |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7200 +/- ##
=======================================
Coverage 98.77% 98.77%
=======================================
Files 81 81
Lines 15223 15223
=======================================
Hits 15037 15037
Misses 186 186 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Those wouldn't create a problem because ch[1] is tested first anyway (I'm not rearranging the order of access as far as I can tell) |
|
I suppose we could retain the if (ch[0] == '0' && (ch[1] == 'x' || ch[1] == 'X')) {
const bool subnormal = ch[2] == '0';
if ((subnormal || ch[2] == '1') && ch[3] == '.') {
// ...
}
}But I'm not sure the |
MichaelChirico
left a comment
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!
|
the whole point of adding const is to improve readability and clarify intent. adding would seem counterintuitive. |

Closed #7183 cc @MichaelChirico