3 ms·
> Modifying code to fix a non-issue has a non-zero chance of introducing a real bug One example of such bug, where fixing a purify warning about uninitialized
by omoikane 4y ago
> Modifying code to fix a non-issue has a non-zero chance of introducing a real bug
One example of such bug, where fixing a purify warning about uninitialized memory crippled OpenSSL:
https://www.schneier.com/blog/archives/2008/05/random_number_b.html https://www.schneier.com/blog/archives/2008/05/random_number...
via: https://xkcd.com/424/ https://xkcd.com/424/
I think it's generally preferred to enable most warnings but have some annotations to silence false positives, preferably with sufficient comments accompanying those annotations to help the code reviewers.
- plorkyeran 4y agoI've never thought that's a very good example of introducing a bug while trying to fix warnings. The warning was correctly pointing out that the code was broken, and the obviously incorrect "fix" merely made it never work instead of sometimes work, but sometimes working really wasn't good enough either.