5 ms·
Not familiar with Linux kernel development practices, but wouldn't have any semi-capable static analysis tool caught this?
by hamidpalo 13y ago
Not familiar with Linux kernel development practices, but wouldn't have any semi-capable static analysis tool caught this?
- icebraining 13y agoYes, nowadays gcc warns you about assignments in conditionals if you enabled it (e.g. with -Wall). But it probably didn't in 2003.
- alextingle 13y agoThis assignment is wrapped in parentheses. GCC will not issue a warning.
- DanBC 13y ago> wouldn't have any semi-capable static analysis tool caught this? Using tools to find "errors" can be problematic. see, for example, the Debian random number bug. (https://www.schneier.com/blog/archives/2008/05/random_number_b.html https://www.schneier.com/blog/archives/2008/05/random_number...) > These lines were removed because they caused the Valgrind and Purify tools to produce warnings about the use of uninitialized data in any code that was linked to OpenSSL.