_dbus_get_is_errno_eagain_or_ewouldblock: avoid -Wlogical-op warning
Submitted by David King
Assigned to D-Bus Maintainers
I tried to build dbus from git master on Fedora 29 (with GCC 8.2.1), and from running autogen.sh and calling make (not injecting any extra CFLAGS, as far as I know), I get the following warning:
dbus-sysdeps-unix.c: In function ‘_dbus_get_is_errno_eagain_or_ewouldblock’: dbus-sysdeps-unix.c:4607:22: error: logical ‘or’ of equal expressions [-Werror=logical-op] return e == EAGAIN || e == EWOULDBLOCK;
errno(3) mentions that EAGAIN and EWOULDBLOCK can be identical, and in this case, they are and the warning is triggered. Working around the warning is quite easy, but complicates the expression.
Version: git master