_must_check
Posted Nov 23, 2006 11:09 UTC (Thu) by
gnb (subscriber, #5132)
In reply to:
_must_check by ldo
Parent article:
KHB: Automating bug hunting
That would be fine if APIs were designed with that in mind, but as things
stand you probably need to be more selective because of commonly used
functions that return values no-one cares about. The most obvious
user-space example is printf. A quick look at google codesearch suggests
that about 0% of the world's programming population checks the return
value (understandably). So a global option probably wouldn't get used
much due to the amount of code that would need "fixing". Having a
case-by-case "no, really _must_ check this one" is messier but likely
to meet less resistance.
(
Log in to post comments)