]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Get rid of format warning in bug-vfprintf-nargs.c.
authorStefan Liebler <stli@linux.vnet.ibm.com>
Wed, 17 Dec 2014 15:43:34 +0000 (16:43 +0100)
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>
Wed, 17 Dec 2014 15:43:34 +0000 (16:43 +0100)
ChangeLog
stdio-common/bug-vfprintf-nargs.c

index 1a79665f7e65242a94fd102337d6abe4221a4c94..276e613d6b46136d87afcc3f8d5c4891e7bdeec6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-12-17  Stefan Liebler  <stli@linux.vnet.ibm.com>
+
+       * stdio-common/bug-vfprintf-nargs.c (do_test):
+       Cast value to intptr_t to avoid format warning
+       for usage with PRIdPTR printing macro.
+
 2014-12-17  Stefan Liebler  <stli@linux.vnet.ibm.com>
 
        * libio/tst-widetext.c (do_test):
index c7e7f0b8b4a29f0d6142156cc3de22862385eae7..75349671a1e83cd00efd199392a45cae54422a70 100644 (file)
@@ -65,7 +65,8 @@ do_test (void)
      test this on 32-bit systems.  */
   if (sizeof (long int) == 4)
     {
-      sprintf (buf, "%%1$d %%%" PRIdPTR "$d", UINT32_MAX / sizeof (int));
+      sprintf (buf, "%%1$d %%%" PRIdPTR "$d",
+              (intptr_t) (UINT32_MAX / sizeof (int)));
       if (format_failed (buf, "1 %$d") != 0)
         rc = 1;
     }