]> git.ipfire.org Git - thirdparty/coreutils.git/commit
build: avoid a warning form gcc's new -Wlogical-op
authorJim Meyering <meyering@fb.com>
Sat, 9 May 2015 17:57:54 +0000 (10:57 -0700)
committerJim Meyering <meyering@fb.com>
Sun, 10 May 2015 05:49:07 +0000 (22:49 -0700)
commitaa7f31fc4a3f4d0c99086660d5ff008c559d657b
tree7aa9cd1d8bc4d1300e90039a8de93cc61c1fd064
parente981643ae3e57affdf3f4f6aa8bf53cf06433f17
build: avoid a warning form gcc's new -Wlogical-op

Without this change, very recent gcc (e.g., version 6.0.0 20150509)
would print the following when configured with --enable-gcc-warnings:

  src/copy.c:165:30: error: logical 'or' of equal expressions \
    [-Werror=logical-op]
    && (errno == EOPNOTSUPP || errno == ENOTSUP || errno == ENOSYS))
                           ^
* src/system.h (is_ENOTSUP): New function.
* src/copy.c (punch_hole): Use it.
* src/ls.c (errno_unsupported, gobble_file): Use it.
src/copy.c
src/ls.c
src/system.h