about summary refs log tree commit diff
path: root/stdio-common/tst-vfprintf-user-type.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2017-06-29 13:32:39 +0200
committerFlorian Weimer <fweimer@redhat.com>2017-06-29 16:46:03 +0200
commit84d8c5bc8b4815bbdd4395f419aed047db3b67e3 (patch)
treebc4931d132af0e8ed5d4d0d8c728710eba32041b /stdio-common/tst-vfprintf-user-type.c
parentccfb2964726512f6669fea99a43afa714e2e6a80 (diff)
downloadglibc-84d8c5bc8b4815bbdd4395f419aed047db3b67e3.tar.gz
glibc-84d8c5bc8b4815bbdd4395f419aed047db3b67e3.tar.xz
glibc-84d8c5bc8b4815bbdd4395f419aed047db3b67e3.zip
vfprintf: Fix tst-vfprintf-mbs-prec and tst-vfprintf-user-type
Diffstat (limited to 'stdio-common/tst-vfprintf-user-type.c')
-rw-r--r--stdio-common/tst-vfprintf-user-type.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/stdio-common/tst-vfprintf-user-type.c b/stdio-common/tst-vfprintf-user-type.c
index e9596c3080..91ea02f382 100644
--- a/stdio-common/tst-vfprintf-user-type.c
+++ b/stdio-common/tst-vfprintf-user-type.c
@@ -29,6 +29,7 @@
 #include <support/check.h>
 #include <support/support.h>
 #include <support/test-driver.h>
+#include <wchar.h>
 
 /* Initialized by do_test using register_printf_type.  */
 static int user_type;
@@ -55,8 +56,9 @@ my_printf_function (FILE *fp, const struct printf_info *info,
                     const void *const *args)
 {
   if (test_verbose > 0)
-    printf ("info: %s (%p, %p, {%p}@%p) called for %%%c (prec %d)\n",
-            __func__, fp, info, args[0], args, info->spec, info->prec);
+    printf ("info: %s (%p, %p, {%p}@%p) called for %%%lc (prec %d)\n",
+            __func__, fp, info, args[0], args, (wint_t) info->spec,
+            info->prec);
 
   TEST_VERIFY (info->spec == 'P');
   size_t nargs;
@@ -109,8 +111,9 @@ my_arginfo_function (const struct printf_info *info,
   if (info->spec != 'P')
     return -1;
   if (test_verbose > 0)
-    printf ("info: %s (%p, %zu, %p, %p) called for %%%c (prec %d)\n",
-            __func__, info, n, argtypes, size, info->spec, info->prec);
+    printf ("info: %s (%p, %zu, %p, %p) called for %%%lc (prec %d)\n",
+            __func__, info, n, argtypes, size, (wint_t) info->spec,
+            info->prec);
 
   TEST_VERIFY_EXIT (n >= 1);
   size_t nargs;