[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
minor change to silence Sun C 5.8 warning on Solaris 10
From: |
Paul Eggert |
Subject: |
minor change to silence Sun C 5.8 warning on Solaris 10 |
Date: |
Tue, 20 Feb 2007 23:58:23 -0800 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
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 <address@hidden>
* 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);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- minor change to silence Sun C 5.8 warning on Solaris 10,
Paul Eggert <=