1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-03-04 12:05:23 +02:00

(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'.
This commit is contained in:
Jim Meyering
2005-10-08 09:05:08 +00:00
parent f754c25d4c
commit 40bf0efd47

View File

@@ -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);
}