https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69602
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Manuel López-Ibáñez from comment #7) > (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). That is something that should be fixed. But if (errno == EAGAIN || (EWOULDBLOCK != EAGAIN && errno == EWOULDBLOCK)) could be better workaround.