https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69602
--- Comment #7 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- (In reply to Eric Blake from comment #0) > However, as shown by the sample code below, gcc 6.0's new warning is > over-ambitious, and is likely to _cause_ rather than cure user bugs, when > uninformed users unaware that Linux has the two errno values equal dumb down > the code to silence the warning, but in the process break their code on > other platforms where it is important to check for both values. As a work-around, something like: if (0 || errno == EAGAIN || errno == EWOULDBLOCK) silences the warning (although it should not).