diff options
author | Jim Meyering <jim@meyering.net> | 2005-10-08 09:05:08 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2005-10-08 09:05:08 +0000 |
commit | 40bf0efd47387010a4dafa8d07146643c8e00aaa (patch) | |
tree | c7fdbc99482d9dbb56db0abfc7a9d8367e87bd02 | |
parent | f754c25d4cb79c179964f50cdc44a5e0dc37736d (diff) | |
download | coreutils-40bf0efd47387010a4dafa8d07146643c8e00aaa.tar.xz |
(rpl_openat): Use the promoted type (int), not mode_t,
as second argument to va_arg. Otherwise, some versions of gcc
warn that `if this code is reached, the program will abort'.
-rw-r--r-- | lib/openat.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/openat.c b/lib/openat.c index 929d26492..092e39610 100644 --- a/lib/openat.c +++ b/lib/openat.c @@ -55,11 +55,8 @@ rpl_openat (int fd, char const *file, int flags, ...) { va_list arg; va_start (arg, flags); - - /* Assume that mode_t is passed compatibly with mode_t's type - after argument promotion. */ - mode = va_arg (arg, mode_t); - + /* Use the promoted type (int), not mode_t, as second argument. */ + mode = (mode_t) va_arg (arg, int); va_end (arg); } |