https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425
Christian Groessler <groessler_christian at yahoo dot de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |groessler_christian at yahoo dot d | |e --- Comment #62 from Christian Groessler <groessler_christian at yahoo dot de> --- (In reply to Segher Boessenkool from comment #60) > So you want to not warn for some (just *some*) explicitly unused cases, and > do > warn for other explicitly unused cases, and all implicitly unused cases? > While > the author of the code explicitly asked for a warning message to be emitted > in > all such cases: "The 'warn_unused_result' attribute causes a warning to be > emitted if a caller of the function with this attribute does not use its > return > value." Yes! I'm write()ing to a pipe a small amount of data (< page size), and anyway don't know how to continue if the write() fails. It would be noticed at the other end. (void)write(....) doesn't suppress the warning. Annoying...