On Sat, Jan 01, 2011 at 08:59:02PM +0000, Jon Grant wrote: > Just building latest code and saw the compiler generated some > warnings. Just thinking, one idea is to check the return value, and the warn_unused_result for write() in glibc is pretty idiotic... > use it as best possible (even just for trace) or (void)bytes to make > it go quiet when there really is no use. (void) foo() is mess and it has no effect for warn_unused_result > bytes = write(1, "\n", 1); hmm.. possible solution is to call error() (but I'm not sure if this is appropriate solution for unimportant things like /etc/issue) or really ignore the return value. It would be nice to have a macro that allows to ignore the return values in some cases ignore_result( write(1, "\n", 1) ); or so... Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html