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.23-505-g9d52cb0


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  9d52cb01f253c84e177fe2db8386deaea06a2596 (commit)
      from  14699b6e371fa2dae3a989c9b1ead4f23a285545 (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=9d52cb01f253c84e177fe2db8386deaea06a2596

commit 9d52cb01f253c84e177fe2db8386deaea06a2596
Author: Florian Weimer <fweimer@redhat.com>
Date:   Thu Jun 23 11:01:21 2016 +0200

    test-skeleton.c: xmalloc, xcalloc, xrealloc are potentially unused
    
    __attribute__ ((used)) means that the function has to be
    emitted in assembly because it is referenced in ways the
    compiler cannot detect (such as asm statements, or some
    post-processing on the generated assembly).
    
    The unused attribute needs to come first, otherwise it is
    applied to the return type and not the function definition.

diff --git a/ChangeLog b/ChangeLog
index 98d78c9..5f9edb4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-06-23  Florian Weimer  <fweimer@redhat.com>
+
+	* test-skeleton.c (xmalloc, xcalloc, xrealloc): Mark as
+	potentially unused.
+
 2016-06-22  Florian Weimer  <fweimer@redhat.com>
 
 	* test-skeleton.c (write_message): New function.
diff --git a/test-skeleton.c b/test-skeleton.c
index 49808b3..0be4af1 100644
--- a/test-skeleton.c
+++ b/test-skeleton.c
@@ -78,8 +78,8 @@ oom_error (const char *fn, size_t size)
 }
 
 /* Allocate N bytes of memory dynamically, with error checking.  */
+__attribute__ ((unused))
 static void *
-__attribute__ ((used))
 xmalloc (size_t n)
 {
   void *p;
@@ -91,8 +91,8 @@ xmalloc (size_t n)
 }
 
 /* Allocate memory for N elements of S bytes, with error checking.  */
+__attribute__ ((unused))
 static void *
-__attribute__ ((used))
 xcalloc (size_t n, size_t s)
 {
   void *p;
@@ -105,8 +105,8 @@ xcalloc (size_t n, size_t s)
 
 /* Change the size of an allocated block of memory P to N bytes,
    with error checking.  */
+__attribute__ ((unused))
 static void *
-__attribute__ ((used))
 xrealloc (void *p, size_t n)
 {
   p = realloc (p, n);

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

Summary of changes:
 ChangeLog       |    5 +++++
 test-skeleton.c |    6 +++---
 2 files changed, 8 insertions(+), 3 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]