Hacker News new | ask | show | jobs
by hamidpalo 4649 days ago
Not familiar with Linux kernel development practices, but wouldn't have any semi-capable static analysis tool caught this?
2 comments

Yes, nowadays gcc warns you about assignments in conditionals if you enabled it (e.g. with -Wall). But it probably didn't in 2003.
This assignment is wrapped in parentheses. GCC will not issue a warning.
> 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...)

> 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.