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.21-594-g70249b5


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  70249b57e1e5f8252948fd0ab46773ad20216e23 (commit)
      from  398a80fec83a41d9f8d16bc3943b9179017a3ee1 (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=70249b57e1e5f8252948fd0ab46773ad20216e23

commit 70249b57e1e5f8252948fd0ab46773ad20216e23
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sat Jul 11 13:41:47 2015 -0700

    Replace %ld with %jd and cast to intmax_t
    
    On x32, GCC 5.1 complains:
    
    tst-fmemopen2.c: In function â??do_test_without_bufferâ??:
    tst-fmemopen2.c:124:15: error: format â??%ldâ?? expects argument of type â??long intâ??, but argument 2 has type â??off_t {aka long long int}â?? [-Werror=format=]
           printf ("FAIL: first ftello returned %ld, expected %zu\n", o, nstr);
                   ^
    tst-fmemopen2.c:135:15: error: format â??%ldâ?? expects argument of type â??long intâ??, but argument 2 has type â??off_t {aka long long int}â?? [-Werror=format=]
           printf ("FAIL: second ftello returned %ld, expected %zu\n", o, nbuf);
                   ^
    tst-fmemopen2.c:148:15: error: format â??%ldâ?? expects argument of type â??long intâ??, but argument 2 has type â??off_t {aka long long int}â?? [-Werror=format=]
           printf ("FAIL: third ftello returned %ld, expected %zu\n", o, nstr2);
                   ^
    tst-fmemopen2.c: In function â??do_test_length_zeroâ??:
    tst-fmemopen2.c:183:15: error: format â??%ldâ?? expects argument of type â??long intâ??, but argument 2 has type â??off_t {aka long long int}â?? [-Werror=format=]
           printf ("FAIL: first ftello returned %ld, expected 0\n", o);
                   ^
    
    This patch silences GCC.
    
    	* stdio-common/tst-fmemopen2.c (do_test_without_buffer): Replace
    	%ld with %jd and cast to intmax_t.
    	(do_test_length_zero): Likewise.

diff --git a/ChangeLog b/ChangeLog
index b6e7a79..84f038c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-07-11  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* stdio-common/tst-fmemopen2.c (do_test_without_buffer): Replace
+	%ld with %jd and cast to intmax_t.
+	(do_test_length_zero): Likewise.
+
 2015-07-10  Roland McGrath  <roland@hack.frob.com>
 
 	* sysdeps/nacl/pthread_condattr_setclock.c: New file.
diff --git a/stdio-common/tst-fmemopen2.c b/stdio-common/tst-fmemopen2.c
index 2f26f20..16dd3ad 100644
--- a/stdio-common/tst-fmemopen2.c
+++ b/stdio-common/tst-fmemopen2.c
@@ -121,7 +121,8 @@ do_test_without_buffer (void)
   off_t o = ftello (fp);
   if (o != nstr)
     {
-      printf ("FAIL: first ftello returned %ld, expected %zu\n", o, nstr);
+      printf ("FAIL: first ftello returned %jd, expected %zu\n",
+	      (intmax_t) o, nstr);
       result = 1;
     }
   if (fseeko (fp, 0, SEEK_END) != 0)
@@ -132,7 +133,8 @@ do_test_without_buffer (void)
   o = ftello (fp);
   if (o != nstr)
     {
-      printf ("FAIL: second ftello returned %ld, expected %zu\n", o, nbuf);
+      printf ("FAIL: second ftello returned %jd, expected %zu\n",
+	      (intmax_t) o, nbuf);
       result = 1;
     }
 
@@ -145,7 +147,8 @@ do_test_without_buffer (void)
   o = ftello (fp);
   if (o != nstr2)
     {
-      printf ("FAIL: third ftello returned %ld, expected %zu\n", o, nstr2);
+      printf ("FAIL: third ftello returned %jd, expected %zu\n",
+	      (intmax_t) o, nstr2);
       result = 1;
     }
   fclose (fp);
@@ -180,7 +183,8 @@ do_test_length_zero (void)
   off_t o = ftello (fp);
   if (o != 0)
     {
-      printf ("FAIL: first ftello returned %ld, expected 0\n", o);
+      printf ("FAIL: first ftello returned %jd, expected 0\n",
+	      (intmax_t) o);
       result = 1;
     }
   fclose (fp);

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

Summary of changes:
 ChangeLog                    |    6 ++++++
 stdio-common/tst-fmemopen2.c |   12 ++++++++----
 2 files changed, 14 insertions(+), 4 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]