diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2010-10-13 20:44:12 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2010-10-13 22:41:21 -0700 |
commit | c586bff1c0d36fc7b57c35fe7e5e8fbd00f83342 (patch) | |
tree | 387d1dfbf40b72199aaadf2ee16b604611ad2149 /src | |
parent | 4015f93d3052b6b11ed5dbcdc032be324a084f07 (diff) | |
download | coreutils-c586bff1c0d36fc7b57c35fe7e5e8fbd00f83342.tar.xz |
install: avoid warning with Solaris 10 cc
* src/install.c (extra_mode): Don't assign ~S_IRWXUGO & ~S_IFMT
to a mode_t variable, as the number might be too big to fit.
Solaris 10 cc warns about this, and the C standard says it
has undefined behavior.
Diffstat (limited to 'src')
-rw-r--r-- | src/install.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/install.c b/src/install.c index 97029140c..467e50046 100644 --- a/src/install.c +++ b/src/install.c @@ -186,8 +186,8 @@ have_same_content (int a_fd, int b_fd) static bool extra_mode (mode_t input) { - const mode_t mask = ~S_IRWXUGO & ~S_IFMT; - return !! (input & mask); + mode_t mask = S_IRWXUGO | S_IFMT; + return !! (input & ~ mask); } /* Return true if copy of file SRC_NAME to file DEST_NAME is necessary. */ |