about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--stdio-common/tst-fmemopen.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index c9b49ca290..ab2220d9ea 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 aba931070b..c5015a6f0e 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;
     }