Here's the patch. I don't normally like unnecessary casts, but I guess
for static initializers we can make an exception....
2007-02-20 Paul Eggert <[EMAIL PROTECTED]>
* src/copy.c (cached_umask): Cast -1 to mode_t to avoid a warning
about out-of-range initializer with Sun C 5.8.
diff --git a/src/copy.c b/src/copy.c
index 5ec5a92..a3489c3 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -1980,7 +1980,7 @@ chown_failure_ok (struct cp_options const *x)
extern mode_t
cached_umask (void)
{
- static mode_t mask = -1;
+ static mode_t mask = (mode_t) -1;
if (mask == (mode_t) -1)
{
mask = umask (0);
_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils