This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.20-502-gdd6e8af


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  dd6e8af6ba1b8a95a7f1dc7422e5ea4ccc7fbd93 (commit)
      from  28c38448de826314c1d89b18a26042fee21d7c9c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dd6e8af6ba1b8a95a7f1dc7422e5ea4ccc7fbd93

commit dd6e8af6ba1b8a95a7f1dc7422e5ea4ccc7fbd93
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Date:   Tue Jan 6 07:59:04 2015 -0500

    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.

diff --git a/ChangeLog b/ChangeLog
index 9066946..962ec26 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2015-01-08  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
+
+	* sysdeps/unix/sysv/linux/futimens.c (futimens): Use address of first
+	timespec struct member in syscall macro.
+	* sysdeps/unix/sysv/linux/utimensat.c (utimensat): Likewise.
+	* sysdeps/unix/sysv/linux/futimesat.c (futimesat): Use address of
+	first timeval struct member in syscall macro.
+	* sysdeps/unix/sysv/linux/utimes.c (__utimeS): Likewise.
+
 2015-01-07  Joseph Myers  <joseph@codesourcery.com>
 
 	[BZ #17748]
diff --git a/sysdeps/unix/sysv/linux/futimens.c b/sysdeps/unix/sysv/linux/futimens.c
index c7d03a8..5f2b8a5 100644
--- a/sysdeps/unix/sysv/linux/futimens.c
+++ b/sysdeps/unix/sysv/linux/futimens.c
@@ -37,7 +37,8 @@ futimens (int fd, const struct timespec tsp[2])
       __set_errno (EBADF);
       return -1;
     }
-  return INLINE_SYSCALL (utimensat, 4, fd, NULL, tsp, 0);
+  /* Avoid implicit array coercion in syscall macros.  */
+  return INLINE_SYSCALL (utimensat, 4, fd, NULL, &tsp[0], 0);
 #else
   __set_errno (ENOSYS);
   return -1;
diff --git a/sysdeps/unix/sysv/linux/futimesat.c b/sysdeps/unix/sysv/linux/futimesat.c
index ac96e2a..27d6870 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]);
 }
diff --git a/sysdeps/unix/sysv/linux/utimensat.c b/sysdeps/unix/sysv/linux/utimensat.c
index 5a5dec7..81b565f 100644
--- a/sysdeps/unix/sysv/linux/utimensat.c
+++ b/sysdeps/unix/sysv/linux/utimensat.c
@@ -35,7 +35,8 @@ utimensat (int fd, const char *file, const struct timespec tsp[2],
       return -1;
     }
 #ifdef __NR_utimensat
-  return INLINE_SYSCALL (utimensat, 4, fd, file, tsp, flags);
+  /* Avoid implicit array coercion in syscall macros.  */
+  return INLINE_SYSCALL (utimensat, 4, fd, file, &tsp[0], flags);
 #else
   __set_errno (ENOSYS);
   return -1;
diff --git a/sysdeps/unix/sysv/linux/utimes.c b/sysdeps/unix/sysv/linux/utimes.c
index 5423ff2..2a1f2f9 100644
--- a/sysdeps/unix/sysv/linux/utimes.c
+++ b/sysdeps/unix/sysv/linux/utimes.c
@@ -29,7 +29,8 @@
 int
 __utimes (const char *file, const struct timeval tvp[2])
 {
-  return INLINE_SYSCALL (utimes, 2, file, tvp);
+  /* Avoid implicit array coercion in syscall macros.  */
+  return INLINE_SYSCALL (utimes, 2, file, &tvp[0]);
 }
 
 weak_alias (__utimes, utimes)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                           |    9 +++++++++
 sysdeps/unix/sysv/linux/futimens.c  |    3 ++-
 sysdeps/unix/sysv/linux/futimesat.c |    8 +++-----
 sysdeps/unix/sysv/linux/utimensat.c |    3 ++-
 sysdeps/unix/sysv/linux/utimes.c    |    3 ++-
 5 files changed, 18 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]