Re:We found over 10000 bugs in various open source projects
by mgrennan on Thursday August 18, 2016 @12:32PM
(#12313953)
Explains why stile matters.
... if (!spfont)
return;
...Just add the CR and all is reveled.
Re:We found over 10000 bugs in various open source projects
by mrSugar on Thursday August 18, 2016 @11:04AM
(#12313002)
Perhaps the append() also returns void. I've seen this kind of bug uncaught by gcc exactly because of that.
This is arguably not a bug; the developer tested the code, massaged it into working as expected, using what look like well-defined constructs, and documented their surprise at certain aspects of the code, leaving this issue easy to find with a grep for TODO.
On another note, what is surprising here is that they didn't catch it with their compiler. Look, the function returns void. GCC has a diagnostic for this, something like "return with expression in a function returning void". I think that still kicks in even if that expression has void type.