about summary refs log tree commit diff
path: root/localedata
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2014-12-11 13:15:08 -0800
committerRoland McGrath <roland@hack.frob.com>2014-12-11 13:15:08 -0800
commit47d51f4f0739a264579d8ea27cd58346b6402e1f (patch)
tree98365acc577665b713d9a2d605d1479c10282167 /localedata
parente9813cfb3d71675c87a16318b20642a366aff74c (diff)
downloadglibc-47d51f4f0739a264579d8ea27cd58346b6402e1f.tar.gz
glibc-47d51f4f0739a264579d8ea27cd58346b6402e1f.tar.xz
glibc-47d51f4f0739a264579d8ea27cd58346b6402e1f.zip
Clean up localedata tests printf formats, don't use -Wno-format.
Diffstat (limited to 'localedata')
-rw-r--r--localedata/Makefile8
-rw-r--r--localedata/tst-mbswcs1.c5
-rw-r--r--localedata/tst-mbswcs2.c6
-rw-r--r--localedata/tst-mbswcs3.c4
-rw-r--r--localedata/tst-mbswcs4.c6
-rw-r--r--localedata/tst-mbswcs5.c4
-rw-r--r--localedata/tst-trans.c4
7 files changed, 15 insertions, 22 deletions
diff --git a/localedata/Makefile b/localedata/Makefile
index c2c62a2122..0826b36091 100644
--- a/localedata/Makefile
+++ b/localedata/Makefile
@@ -126,14 +126,6 @@ $(inst_i18ndir)/charmaps/%.gz: charmaps/% $(+force)
 # Install the locale source files in the appropriate directory.
 $(inst_i18ndir)/locales/%: locales/% $(+force); $(do-install)
 
-# gcc does not know all the format specifiers we are using here.
-CFLAGS-tst-mbswcs1.c = -Wno-format
-CFLAGS-tst-mbswcs2.c = -Wno-format
-CFLAGS-tst-mbswcs3.c = -Wno-format
-CFLAGS-tst-mbswcs4.c = -Wno-format
-CFLAGS-tst-mbswcs5.c = -Wno-format
-CFLAGS-tst-trans.c = -Wno-format
-
 
 ifeq ($(run-built-tests),yes)
 generated-dirs += $(LOCALES)
diff --git a/localedata/tst-mbswcs1.c b/localedata/tst-mbswcs1.c
index 140482900f..15691dbb4f 100644
--- a/localedata/tst-mbswcs1.c
+++ b/localedata/tst-mbswcs1.c
@@ -24,11 +24,12 @@
 
 #define show(expr, nexp, wcexp) \
   n = expr;								  \
-  printf (#expr " -> %Zd", n);						  \
+  printf (#expr " -> %zu", n);						  \
   printf (", wc = %lu", (unsigned long int) wc);			  \
   if (n != (size_t) nexp || wc != wcexp)				  \
     {									  \
-      printf (", expected %Zd and %lu", nexp, (unsigned long int) wcexp); \
+      printf (", expected %zu and %lu", (size_t) nexp,			  \
+	      (unsigned long int) wcexp);				  \
       result = 1;							  \
     }									  \
   putc ('\n', stdout)
diff --git a/localedata/tst-mbswcs2.c b/localedata/tst-mbswcs2.c
index 9cd95d6808..d0f502c4d3 100644
--- a/localedata/tst-mbswcs2.c
+++ b/localedata/tst-mbswcs2.c
@@ -24,12 +24,12 @@
 
 #define show(expr, nexp, wcexp, end) \
   n = expr;								\
-  printf (#expr " -> %Zd", n);						\
-  printf (", wc = %lu, src = buf+%d", (unsigned long int) wc,		\
+  printf (#expr " -> %zu", n);						\
+  printf (", wc = %lu, src = buf+%td", (unsigned long int) wc,		\
 	  src - (const char *) buf);					\
   if (n != (size_t) nexp || wc != wcexp || src != (const char *) (end))	\
     {									\
-      printf (", expected %Zd and %lu and buf+%d", nexp,		\
+      printf (", expected %zu and %lu and buf+%td", (size_t) nexp,	\
 	      (unsigned long int) wcexp, (end) - buf);			\
       result = 1;							\
     }									\
diff --git a/localedata/tst-mbswcs3.c b/localedata/tst-mbswcs3.c
index a068541a7c..ef18a98699 100644
--- a/localedata/tst-mbswcs3.c
+++ b/localedata/tst-mbswcs3.c
@@ -25,13 +25,13 @@
 #define show(expr, nexp, srcexp, bufexp) \
   {									\
     size_t res = expr;							\
-    printf (#expr " -> %Zd", res);					\
+    printf (#expr " -> %zu", res);					\
     dst += res;								\
     printf (", src = srcbuf+%td, dst = buf+%td",			\
 	    src - srcbuf, dst - (char *) buf);				\
     if (res != nexp || src != (srcexp) || dst != (char *) (bufexp))	\
       {									\
-	printf (", expected %Zd and srcbuf+%td and buf+%td", nexp,	\
+	printf (", expected %zu and srcbuf+%td and buf+%td", (size_t) nexp, \
 		(srcexp) - srcbuf, (bufexp) - (unsigned char *) buf);	\
 	result = 1;							\
       }									\
diff --git a/localedata/tst-mbswcs4.c b/localedata/tst-mbswcs4.c
index a4fe60dff8..83c5eacd0a 100644
--- a/localedata/tst-mbswcs4.c
+++ b/localedata/tst-mbswcs4.c
@@ -23,12 +23,12 @@
 
 #define show(expr, nexp, wcexp, end) \
   n = expr;								\
-  printf (#expr " -> %Zd", n);						\
-  printf (", wc = %lu, src = buf+%d", (unsigned long int) wc,		\
+  printf (#expr " -> %zu", n);						\
+  printf (", wc = %lu, src = buf+%td", (unsigned long int) wc,		\
 	  src - (const char *) buf);					\
   if (n != (size_t) nexp || wc != wcexp || src != (const char *) (end))	\
     {									\
-      printf (", expected %Zd and %lu and buf+%d", nexp,		\
+      printf (", expected %zu and %lu and buf+%td", (size_t) nexp,	\
 	      (unsigned long int) wcexp, (end) - buf);			\
       result = 1;							\
     }									\
diff --git a/localedata/tst-mbswcs5.c b/localedata/tst-mbswcs5.c
index c44f12a49d..1ff56f3042 100644
--- a/localedata/tst-mbswcs5.c
+++ b/localedata/tst-mbswcs5.c
@@ -25,12 +25,12 @@
 #define show(expr, nexp, bufexp) \
   {									\
     size_t res = expr;							\
-    printf (#expr " -> %Zd", res);					\
+    printf (#expr " -> %zu", res);					\
     dst += res;								\
     printf (", dst = buf+%td", dst - (char *) buf);			\
     if (res != nexp || dst != (char *) (bufexp))			\
       {									\
-	printf (", expected %Zd and buf+%td", nexp,			\
+	printf (", expected %zu and buf+%td", (size_t) nexp,		\
 		(bufexp) - (unsigned char *) buf);			\
 	result = 1;							\
       }									\
diff --git a/localedata/tst-trans.c b/localedata/tst-trans.c
index 0b0be83c78..616c896809 100644
--- a/localedata/tst-trans.c
+++ b/localedata/tst-trans.c
@@ -44,12 +44,12 @@ do_test (void)
     }
 
   wch = towctrans (L'A', t);
-  printf ("towctrans (L'A', t) = %c\n", wch);
+  printf ("towctrans (L'A', t) = %lc\n", wch);
   if (wch != L'B')
     errors = 1;
 
   wch = towctrans (L'B', t);
-  printf ("towctrans (L'B', t) = %c\n", wch);
+  printf ("towctrans (L'B', t) = %lc\n", wch);
   if (wch != L'C')
     errors = 1;