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.24-319-g1b16ff0


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  1b16ff0b1e6906d4f5a4380c4ca5750e87c5e52d (commit)
      from  f82a4bdb73328bc53bdcc344622acbd96522a83c (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=1b16ff0b1e6906d4f5a4380c4ca5750e87c5e52d

commit 1b16ff0b1e6906d4f5a4380c4ca5750e87c5e52d
Author: Gabriel F T Gomes <gftg@linux.vnet.ibm.com>
Date:   Fri Oct 28 15:57:15 2016 -0200

    Fix warning caused by unused-result in bug-atexit3-lib.cc
    
    The test case dlfcn/bug-atexit3-lib.cc calls write and doesn't check the
    result.  When building with GCC 6.2, this generates a warning in 'make
    check', which is treated as an error.  This patch replaces the call to
    write with a call to write_message.
    
    Tested for powerpc64le.

diff --git a/ChangeLog b/ChangeLog
index eed5cc5..d49f221 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-10-28  Gabriel F. T. Gomes  <gftg@linux.vnet.ibm.com>
+
+	* dlfcn/bug-atexit3-lib.cc (write_message): New function, copied
+	from test-skeleton.c.
+	(statclass): Replace calls to write with calls to write_message.
+
 2016-10-28  Joseph Myers  <joseph@codesourcery.com>
 
 	* math/math.h
diff --git a/dlfcn/bug-atexit3-lib.cc b/dlfcn/bug-atexit3-lib.cc
index 3d01ea8..aba7720 100644
--- a/dlfcn/bug-atexit3-lib.cc
+++ b/dlfcn/bug-atexit3-lib.cc
@@ -1,14 +1,22 @@
 #include <unistd.h>
+#include <string.h>
+
+static void
+write_message (const char *message)
+{
+  ssize_t unused __attribute__ ((unused));
+  unused = write (STDOUT_FILENO, message, strlen (message));
+}
 
 struct statclass
 {
   statclass()
   {
-    write (1, "statclass\n", 10);
+    write_message ("statclass\n");
   }
   ~statclass()
   {
-    write (1, "~statclass\n", 11);
+    write_message ("~statclass\n");
   }
 };
 

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

Summary of changes:
 ChangeLog                |    6 ++++++
 dlfcn/bug-atexit3-lib.cc |   12 ++++++++++--
 2 files changed, 16 insertions(+), 2 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]