id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 2534,Removing gcc warning,richard@…,chris_kohlhoff,"The function boost::asio::detail::pipe_select_interrupter::interupt() in produces the following warning in gcc 4.3.2 / glibc 2.8 when compiled with -O1 or higher. The warning occurs even without any -W options. ./boost/asio/detail/pipe_select_interrupter.hpp:75: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result As the message implies, gcc issues this warning whenever a function declared with __attribute__((warn_unused_result)); it appears that gcc implicitly places this attribute on ::write as the glibc header doesn't contain it. A short test case is: #include int main() { ::write(1, 0, 0); } To suppress the warning, the function interupt() function can be altered as follows: #include void interrupt() { char byte = 0; ignore_unused_variable_warning( ::write(write_descriptor_, &byte, 1) ); } Is there any chance of making a change along these lines? Apologies if this is a know issue: a quick search of the mailing list didn't turn anything up. ",Bugs,closed,Boost 1.38.0,asio,Boost 1.37.0,Cosmetic,fixed,gcc warning,