Philosophically, it's due to a famous system programmer's dictum: "Always check the return value of system calls".
The corollary of this is that one should clearly document when explicitly ignoring the return value. A simple way of this in C becomes a cast to void of the return. Since printf does I/O, it qualifies.
Specifically, this code is from a patch to the FreeBSD source which is ruled by style(9); you will find this form throughout BSD source.
The corollary of this is that one should clearly document when explicitly ignoring the return value. A simple way of this in C becomes a cast to void of the return. Since printf does I/O, it qualifies.
Specifically, this code is from a patch to the FreeBSD source which is ruled by style(9); you will find this form throughout BSD source.