Hello. Does it seem reasonable to use: - fwrite (...); + assert(fwrite (...));
or: sed 's/fwrite (...)/assert(&)/' to deal with -D_FORTIFY_SOURCE warnings with fwrite(), dup(), chdir(), fchown(), fgets(), write(), mktemp(), mkstemp(), mkdtemp(), and friends who give "warning: ignoring return value of 'mktemp', declared with attribute warn_unused_result"? It seems to work well, in some places, and adds some lightweight bounds checking. It worked perfectly with Binutils... 'make check' passed any nothing crashed. I'm having some issues with GCC, itself, though. I'm not able to find information about the performance impact of assert(), but I suspect it's not that bad. And I couldn't find anyone else using assert() to deal with the "ignoring return value" warning. It makes the sed commands easy to write and paste too. robert
pgps3GXfqGBpJ.pgp
Description: PGP signature
-- http://linuxfromscratch.org/mailman/listinfo/hlfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
