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-267-gd88548f


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  d88548f497e52ad7633db1f3243daef0ba9fe54b (commit)
      from  be97091638d156a53009b4034c60b58eaf3efa24 (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=d88548f497e52ad7633db1f3243daef0ba9fe54b

commit d88548f497e52ad7633db1f3243daef0ba9fe54b
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Thu Nov 27 03:25:15 2014 +0000

    Fix stdio-common/tst-fmemopen.c format warnings.
    
    Testing for 32-bit x86 shows up warnings in
    stdio-common/tst-fmemopen.c where off_t values are passed to %zu
    printf formats.  Since the values are in messages relating to function
    calls where the relevant argument is of type size_t, it seems most
    appropriate to cast explicitly to size_t when passing to printf, which
    this patch does.
    
    Tested for 32-bit x86.
    
    	* stdio-common/tst-fmemopen.c (do_test): Cast st_size values to
    	size_t for %zu format.

diff --git a/ChangeLog b/ChangeLog
index c9b49ca..ab2220d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2014-11-27  Joseph Myers  <joseph@codesourcery.com>
 
+	* stdio-common/tst-fmemopen.c (do_test): Cast st_size values to
+	size_t for %zu format.
+
 	* nss/tst-nss-test1.c (do_test): Use %td printf format for pointer
 	difference, not %ju.
 
diff --git a/stdio-common/tst-fmemopen.c b/stdio-common/tst-fmemopen.c
index aba9310..c5015a6 100644
--- a/stdio-common/tst-fmemopen.c
+++ b/stdio-common/tst-fmemopen.c
@@ -108,13 +108,13 @@ do_test (void)
 				  MAP_SHARED, fd, 0)) == MAP_FAILED)
     {
       printf ("mmap (NULL, %zu, PROT_READ, MAP_SHARED, %i, 0) failed\n",
-	      fs.st_size, fd);
+	      (size_t) fs.st_size, fd);
       return 5;
     }
 
   if ((fp = fmemopen (mmap_data, fs.st_size, "r")) == NULL)
     {
-      printf ("fmemopen (%p, %zu) failed\n", mmap_data, fs.st_size);
+      printf ("fmemopen (%p, %zu) failed\n", mmap_data, (size_t) fs.st_size);
       return 1;
     }
 

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

Summary of changes:
 ChangeLog                   |    3 +++
 stdio-common/tst-fmemopen.c |    4 ++--
 2 files changed, 5 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]