On 4 Nov 2014, at 10:28, Stefan Farfeleder <stef...@freebsd.org> wrote:

> Shouldn't Coverity understand that err doesn't return?

err() is marked as __dead2, which expands to __attribute__((__noreturn__)).  If 
Coverity doesn't know that __attribute__((__noreturn__)) functions don't 
return, then that's a Coverity bug and they should fix it (if we're not 
expanding __dead3 to __attribute__((__noreturn__)) for Coverity, then that's a 
sys/cdefs.h bug and should be fixed there).  

Putting a break after a noreturn function makes the code less readable and will 
cause errors in non-buggy static analysers (dead code warning - why do you have 
a break on an unreachable line?).

David

_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to