Skip to content

Commit

Permalink
Get rid of format warning in bug-vfprintf-nargs.c.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Liebler authored and Andreas Krebbel committed Dec 17, 2014
1 parent eca2772 commit d22ce01
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
3 changes: 2 additions & 1 deletion stdio-common/bug-vfprintf-nargs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d22ce01

Please sign in to comment.