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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user