diff options
author | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2015-01-06 07:59:04 -0500 |
---|---|---|
committer | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2015-01-08 08:03:31 -0500 |
commit | dd6e8af6ba1b8a95a7f1dc7422e5ea4ccc7fbd93 (patch) | |
tree | 10046fc1091a66245c81fe62ef62ef52b11413ca /sysdeps/unix/sysv/linux/futimesat.c | |
parent | 28c38448de826314c1d89b18a26042fee21d7c9c (diff) | |
download | glibc-dd6e8af6ba1b8a95a7f1dc7422e5ea4ccc7fbd93.tar.gz glibc-dd6e8af6ba1b8a95a7f1dc7422e5ea4ccc7fbd93.tar.xz glibc-dd6e8af6ba1b8a95a7f1dc7422e5ea4ccc7fbd93.zip |
powerpc: Fix compiler warning on some syscalls
GCC 5.0 emits an warning when using sizeof on array function parameters and powerpc internal syscall macros add a check for such cases. More specifically, on powerpc64 and powerpc32 sysdep.h: if (__builtin_classify_type (__arg3) != 5 && sizeof (__arg3) > 8) \ __illegally_sized_syscall_arg3 (); \ And for sysdeps/unix/sysv/linux/utimensat.c build GCC emits: error: ‘sizeof’ on array function parameter ‘tsp’ will return size of ‘const struct timespec *’ This patch uses the address of first struct member instead of the struct itself in syscall macro.
Diffstat (limited to 'sysdeps/unix/sysv/linux/futimesat.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/futimesat.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sysdeps/unix/sysv/linux/futimesat.c b/sysdeps/unix/sysv/linux/futimesat.c index ac96e2af39..27d68702e1 100644 --- a/sysdeps/unix/sysv/linux/futimesat.c +++ b/sysdeps/unix/sysv/linux/futimesat.c @@ -28,13 +28,11 @@ /* Change the access time of FILE relative to FD to TVP[0] and the modification time of FILE to TVP[1]. */ int -futimesat (fd, file, tvp) - int fd; - const char *file; - const struct timeval tvp[2]; +futimesat (int fd, const char *file, const struct timeval tvp[2]) { if (file == NULL) return __futimes (fd, tvp); - return INLINE_SYSCALL (futimesat, 3, fd, file, tvp); + /* Avoid implicit array coercion in syscall macros. */ + return INLINE_SYSCALL (futimesat, 3, fd, file, &tvp[0]); } |