Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6]: src/tests/lib/libc Pull up following revision(s) (requested b...



details:   https://anonhg.NetBSD.org/src/rev/382235ba4948
branches:  netbsd-6
changeset: 773932:382235ba4948
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sat Mar 17 17:49:55 2012 +0000

description:
Pull up following revision(s) (requested by joerg in ticket #119):
        tests/lib/libc/stdio/t_printf.c: revision 1.5
        tests/lib/libc/stdio/t_scanf.c: revision 1.2
        tests/lib/libc/gen/t_humanize_number.c: revision 1.6
Mark w_printf as __printflike and fix a format string error.
Fix format strings to properly quote %.

diffstat:

 tests/lib/libc/gen/t_humanize_number.c |  6 +++---
 tests/lib/libc/stdio/t_printf.c        |  4 ++--
 tests/lib/libc/stdio/t_scanf.c         |  4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diffs (63 lines):

diff -r 01fa1e496f62 -r 382235ba4948 tests/lib/libc/gen/t_humanize_number.c
--- a/tests/lib/libc/gen/t_humanize_number.c    Sat Mar 17 17:48:48 2012 +0000
+++ b/tests/lib/libc/gen/t_humanize_number.c    Sat Mar 17 17:49:55 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_humanize_number.c,v 1.5 2011/07/07 09:49:59 jruoho Exp $     */
+/*     $NetBSD: t_humanize_number.c,v 1.5.4.1 2012/03/17 17:49:55 bouyer Exp $ */
 
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
@@ -112,7 +112,7 @@
 
 const char *formatflags(char *, size_t, const struct hnflags *, size_t, int);
 void       newline(void);
-void       w_printf(const char *, ...);
+void       w_printf(const char *, ...) __printflike(1, 2);
 int        main(int, char *[]);
 
 const char *
@@ -226,7 +226,7 @@
                    (rv == -1 || strcmp(buf, ho->ho_retstr) == 0))
                        continue;
 
-               w_printf("humanize_number(\"%s\", %d, %" PRId64 ",",
+               w_printf("humanize_number(\"%s\", %zu, %" PRId64 ",",
                    ho->ho_retstr, ho->ho_len, ho->ho_num);
                w_printf("\"%s\",", ho->ho_suffix);
                w_printf("%s,", formatflags(fbuf, sizeof(fbuf), scale_flags,
diff -r 01fa1e496f62 -r 382235ba4948 tests/lib/libc/stdio/t_printf.c
--- a/tests/lib/libc/stdio/t_printf.c   Sat Mar 17 17:48:48 2012 +0000
+++ b/tests/lib/libc/stdio/t_printf.c   Sat Mar 17 17:49:55 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_printf.c,v 1.2 2011/07/13 11:17:03 jruoho Exp $ */
+/* $NetBSD: t_printf.c,v 1.2.4.1 2012/03/17 17:49:55 bouyer Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
 {
 
        atf_tc_set_md_var(tc, "descr", \
-           "PR lib/32951: %.0f formats (0.0,0.5] to \"0.\"");
+           "PR lib/32951: %%.0f formats (0.0,0.5] to \"0.\"");
 }
 
 ATF_TC_BODY(snprintf_dotzero, tc)
diff -r 01fa1e496f62 -r 382235ba4948 tests/lib/libc/stdio/t_scanf.c
--- a/tests/lib/libc/stdio/t_scanf.c    Sat Mar 17 17:48:48 2012 +0000
+++ b/tests/lib/libc/stdio/t_scanf.c    Sat Mar 17 17:49:55 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_scanf.c,v 1.1 2011/07/08 06:38:04 jruoho Exp $ */
+/* $NetBSD: t_scanf.c,v 1.1.4.1 2012/03/17 17:49:55 bouyer Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
 {
 
        atf_tc_set_md_var(tc, "descr", \
-           "PR lib/21691: %i and %x fail with negative hex numbers");
+           "PR lib/21691: %%i and %%x fail with negative hex numbers");
 }
 
 ATF_TC_BODY(sscanf_neghex, tc)



Home | Main Index | Thread Index | Old Index