diff options
-rw-r--r-- | src/regress/lib/libc/atexit/Makefile | 13 | ||||
-rw-r--r-- | src/regress/lib/libc/atexit/atexit_test.c | 5 | ||||
-rw-r--r-- | src/regress/lib/libc/cephes/ieetst.c | 3 | ||||
-rw-r--r-- | src/regress/lib/libc/cephes/mconf.h | 4 | ||||
-rw-r--r-- | src/regress/lib/libc/db/dbtest.c | 28 | ||||
-rw-r--r-- | src/regress/lib/libc/locale/Makefile | 10 | ||||
-rw-r--r-- | src/regress/lib/libc/locale/check_isw/Makefile | 7 | ||||
-rw-r--r-- | src/regress/lib/libc/locale/check_isw/check_isw.c | 4 | ||||
-rw-r--r-- | src/regress/lib/libc/locale/mbrtowc/Makefile | 10 | ||||
-rw-r--r-- | src/regress/lib/libc/locale/mbrtowc/test_mbrtowc.c | 7 | ||||
-rw-r--r-- | src/regress/lib/libc/locale/setlocale/Makefile | 5 | ||||
-rw-r--r-- | src/regress/lib/libc/locale/wcrtomb/Makefile | 10 | ||||
-rw-r--r-- | src/regress/lib/libc/locale/wcrtomb/test_wcrtomb.c | 7 | ||||
-rw-r--r-- | src/regress/lib/libc/malloc/malloc_ulimit1/malloc_ulimit1.c | 3 | ||||
-rw-r--r-- | src/regress/lib/libc/malloc/malloc_ulimit2/malloc_ulimit2.c | 3 | ||||
-rw-r--r-- | src/regress/lib/libc/sprintf/Makefile | 11 | ||||
-rw-r--r-- | src/regress/lib/libc/telldir/utils.c | 4 | ||||
-rw-r--r-- | src/regress/lib/libc/vis/vis_test.c | 8 |
18 files changed, 67 insertions, 75 deletions
diff --git a/src/regress/lib/libc/atexit/Makefile b/src/regress/lib/libc/atexit/Makefile index 057844d767..eb8c55e91e 100644 --- a/src/regress/lib/libc/atexit/Makefile +++ b/src/regress/lib/libc/atexit/Makefile | |||
@@ -1,12 +1,11 @@ | |||
1 | # $OpenBSD: Makefile,v 1.6 2015/10/25 18:01:24 guenther Exp $ | 1 | # $OpenBSD: Makefile,v 1.7 2017/07/27 15:08:37 bluhm Exp $ |
2 | 2 | ||
3 | NOMAN= | 3 | PROG = atexit_test |
4 | PROG=atexit_test | 4 | CPPFLAGS = -I${.CURDIR}/../../../../lib/libc |
5 | CPPFLAGS+=-I${.CURDIR}/../../../../lib/libc -D'PROTO_NORMAL(x)=__asm("")' | 5 | CLEANFILES = invalid.out valid.out |
6 | CLEANFILES+= invalid.out valid.out | 6 | LDADD = -static |
7 | LDADD=-static | ||
8 | 7 | ||
9 | run-regress-atexit_test: ${PROG} | 8 | run-regress-${PROG}: ${PROG} |
10 | ./${PROG} -valid 2>${.OBJDIR}/valid.out | 9 | ./${PROG} -valid 2>${.OBJDIR}/valid.out |
11 | cmp -s ${.OBJDIR}/valid.out ${.CURDIR}/valid.ok | 10 | cmp -s ${.OBJDIR}/valid.out ${.CURDIR}/valid.ok |
12 | ./${PROG} -invalid-atexit 2>${.OBJDIR}/invalid.out | 11 | ./${PROG} -invalid-atexit 2>${.OBJDIR}/invalid.out |
diff --git a/src/regress/lib/libc/atexit/atexit_test.c b/src/regress/lib/libc/atexit/atexit_test.c index e1ea82f827..b060a9b341 100644 --- a/src/regress/lib/libc/atexit/atexit_test.c +++ b/src/regress/lib/libc/atexit/atexit_test.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: atexit_test.c,v 1.8 2015/10/25 04:11:00 guenther Exp $ */ | 1 | /* $OpenBSD: atexit_test.c,v 1.9 2017/07/27 15:08:37 bluhm Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2002 Daniel Hartmeier | 4 | * Copyright (c) 2002 Daniel Hartmeier |
@@ -39,6 +39,9 @@ | |||
39 | #include <string.h> | 39 | #include <string.h> |
40 | #include <signal.h> | 40 | #include <signal.h> |
41 | #include <unistd.h> | 41 | #include <unistd.h> |
42 | |||
43 | #include "include/namespace.h" | ||
44 | #include "hidden/stdlib.h" | ||
42 | #include "stdlib/atexit.h" | 45 | #include "stdlib/atexit.h" |
43 | 46 | ||
44 | void handle_first(void); | 47 | void handle_first(void); |
diff --git a/src/regress/lib/libc/cephes/ieetst.c b/src/regress/lib/libc/cephes/ieetst.c index 41dfd6a96e..974fb65c13 100644 --- a/src/regress/lib/libc/cephes/ieetst.c +++ b/src/regress/lib/libc/cephes/ieetst.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ieetst.c,v 1.2 2011/07/03 13:39:07 martynas Exp $ */ | 1 | /* $OpenBSD: ieetst.c,v 1.3 2017/07/27 15:08:37 bluhm Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2008 Stephen L. Moshier <steve@moshier.net> | 4 | * Copyright (c) 2008 Stephen L. Moshier <steve@moshier.net> |
@@ -94,6 +94,7 @@ static int etrflag; | |||
94 | void chkit(), printerr(), mnrand(), etrand(), shownoncrit(); | 94 | void chkit(), printerr(), mnrand(), etrand(), shownoncrit(); |
95 | void chkid(), pvec(); | 95 | void chkid(), pvec(); |
96 | 96 | ||
97 | int | ||
97 | main() | 98 | main() |
98 | { | 99 | { |
99 | int i, iprec, retval = 0; | 100 | int i, iprec, retval = 0; |
diff --git a/src/regress/lib/libc/cephes/mconf.h b/src/regress/lib/libc/cephes/mconf.h index 7527193e2a..410849c355 100644 --- a/src/regress/lib/libc/cephes/mconf.h +++ b/src/regress/lib/libc/cephes/mconf.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: mconf.h,v 1.2 2014/07/21 01:51:11 guenther Exp $ */ | 1 | /* $OpenBSD: mconf.h,v 1.3 2017/07/27 15:08:37 bluhm Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2008 Stephen L. Moshier <steve@moshier.net> | 4 | * Copyright (c) 2008 Stephen L. Moshier <steve@moshier.net> |
@@ -185,3 +185,5 @@ int mtherr(); | |||
185 | 185 | ||
186 | /* Variable for error reporting. See mtherr.c. */ | 186 | /* Variable for error reporting. See mtherr.c. */ |
187 | extern int merror; | 187 | extern int merror; |
188 | |||
189 | int drand(double *); | ||
diff --git a/src/regress/lib/libc/db/dbtest.c b/src/regress/lib/libc/db/dbtest.c index 5087f0a025..6a79e4c187 100644 --- a/src/regress/lib/libc/db/dbtest.c +++ b/src/regress/lib/libc/db/dbtest.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dbtest.c,v 1.15 2017/04/16 16:04:48 kettenis Exp $ */ | 1 | /* $OpenBSD: dbtest.c,v 1.16 2017/07/27 15:08:37 bluhm Exp $ */ |
2 | /* $NetBSD: dbtest.c,v 1.8 1996/05/03 21:57:48 cgd Exp $ */ | 2 | /* $NetBSD: dbtest.c,v 1.8 1996/05/03 21:57:48 cgd Exp $ */ |
3 | 3 | ||
4 | /*- | 4 | /*- |
@@ -50,7 +50,7 @@ enum S { COMMAND, COMPARE, GET, PUT, REMOVE, SEQ, SEQFLAG, KEY, DATA }; | |||
50 | void compare(DBT *, DBT *); | 50 | void compare(DBT *, DBT *); |
51 | DBTYPE dbtype(char *); | 51 | DBTYPE dbtype(char *); |
52 | void dump(DB *, int); | 52 | void dump(DB *, int); |
53 | void dberr(const char *, ...); | 53 | void __dead dberr(const char *, ...); |
54 | void get(DB *, DBT *); | 54 | void get(DB *, DBT *); |
55 | void getdata(DB *, DBT *, DBT *); | 55 | void getdata(DB *, DBT *, DBT *); |
56 | void put(DB *, DBT *, DBT *); | 56 | void put(DB *, DBT *, DBT *); |
@@ -61,7 +61,7 @@ void *rfile(char *, size_t *); | |||
61 | void seq(DB *, DBT *); | 61 | void seq(DB *, DBT *); |
62 | u_int setflags(char *); | 62 | u_int setflags(char *); |
63 | void *setinfo(DBTYPE, char *); | 63 | void *setinfo(DBTYPE, char *); |
64 | void usage(void); | 64 | void __dead usage(void); |
65 | void *xmalloc(char *, size_t); | 65 | void *xmalloc(char *, size_t); |
66 | 66 | ||
67 | DBTYPE type; /* Database type. */ | 67 | DBTYPE type; /* Database type. */ |
@@ -345,7 +345,7 @@ compare(db1, db2) | |||
345 | len = MIN(db1->size, db2->size); | 345 | len = MIN(db1->size, db2->size); |
346 | for (p1 = db1->data, p2 = db2->data; len--;) | 346 | for (p1 = db1->data, p2 = db2->data; len--;) |
347 | if (*p1++ != *p2++) { | 347 | if (*p1++ != *p2++) { |
348 | printf("compare failed at offset %d\n", | 348 | printf("compare failed at offset %ld\n", |
349 | p1 - (u_char *)db1->data); | 349 | p1 - (u_char *)db1->data); |
350 | break; | 350 | break; |
351 | } | 351 | } |
@@ -372,8 +372,8 @@ get(dbp, kp) | |||
372 | if (ofd != STDOUT_FILENO) | 372 | if (ofd != STDOUT_FILENO) |
373 | (void)write(ofd, NOSUCHKEY, sizeof(NOSUCHKEY) - 1); | 373 | (void)write(ofd, NOSUCHKEY, sizeof(NOSUCHKEY) - 1); |
374 | else | 374 | else |
375 | (void)fprintf(stderr, "%d: %.*s: %s", | 375 | (void)fprintf(stderr, "%lu: %.*s: %s", lineno, |
376 | lineno, MIN(kp->size, 20), kp->data, NOSUCHKEY); | 376 | MIN((int)kp->size, 20), kp->data, NOSUCHKEY); |
377 | #undef NOSUCHKEY | 377 | #undef NOSUCHKEY |
378 | break; | 378 | break; |
379 | } | 379 | } |
@@ -429,11 +429,11 @@ rem(dbp, kp) | |||
429 | if (ofd != STDOUT_FILENO) | 429 | if (ofd != STDOUT_FILENO) |
430 | (void)write(ofd, NOSUCHKEY, sizeof(NOSUCHKEY) - 1); | 430 | (void)write(ofd, NOSUCHKEY, sizeof(NOSUCHKEY) - 1); |
431 | else if (flags != R_CURSOR) | 431 | else if (flags != R_CURSOR) |
432 | (void)fprintf(stderr, "%d: %.*s: %s", | 432 | (void)fprintf(stderr, "%lu: %.*s: %s", lineno, |
433 | lineno, MIN(kp->size, 20), kp->data, NOSUCHKEY); | 433 | MIN((int)kp->size, 20), kp->data, NOSUCHKEY); |
434 | else | 434 | else |
435 | (void)fprintf(stderr, | 435 | (void)fprintf(stderr, |
436 | "%d: rem of cursor failed\n", lineno); | 436 | "%lu: rem of cursor failed\n", lineno); |
437 | #undef NOSUCHKEY | 437 | #undef NOSUCHKEY |
438 | break; | 438 | break; |
439 | } | 439 | } |
@@ -473,11 +473,11 @@ seq(dbp, kp) | |||
473 | if (ofd != STDOUT_FILENO) | 473 | if (ofd != STDOUT_FILENO) |
474 | (void)write(ofd, NOSUCHKEY, sizeof(NOSUCHKEY) - 1); | 474 | (void)write(ofd, NOSUCHKEY, sizeof(NOSUCHKEY) - 1); |
475 | else if (flags == R_CURSOR) | 475 | else if (flags == R_CURSOR) |
476 | (void)fprintf(stderr, "%d: %.*s: %s", | 476 | (void)fprintf(stderr, "%lu: %.*s: %s", lineno, |
477 | lineno, MIN(kp->size, 20), kp->data, NOSUCHKEY); | 477 | MIN((int)kp->size, 20), kp->data, NOSUCHKEY); |
478 | else | 478 | else |
479 | (void)fprintf(stderr, | 479 | (void)fprintf(stderr, |
480 | "%d: seq (%s) failed\n", lineno, sflags(flags)); | 480 | "%lu: seq (%s) failed\n", lineno, sflags(flags)); |
481 | #undef NOSUCHKEY | 481 | #undef NOSUCHKEY |
482 | break; | 482 | break; |
483 | } | 483 | } |
@@ -708,7 +708,7 @@ xmalloc(text, len) | |||
708 | return (p); | 708 | return (p); |
709 | } | 709 | } |
710 | 710 | ||
711 | void | 711 | void __dead |
712 | usage() | 712 | usage() |
713 | { | 713 | { |
714 | (void)fprintf(stderr, | 714 | (void)fprintf(stderr, |
@@ -716,7 +716,7 @@ usage() | |||
716 | exit(1); | 716 | exit(1); |
717 | } | 717 | } |
718 | 718 | ||
719 | void | 719 | void __dead |
720 | dberr(const char *fmt, ...) | 720 | dberr(const char *fmt, ...) |
721 | { | 721 | { |
722 | va_list ap; | 722 | va_list ap; |
diff --git a/src/regress/lib/libc/locale/Makefile b/src/regress/lib/libc/locale/Makefile index b8d046c678..b3ca6bad85 100644 --- a/src/regress/lib/libc/locale/Makefile +++ b/src/regress/lib/libc/locale/Makefile | |||
@@ -1,11 +1,5 @@ | |||
1 | # $OpenBSD: Makefile,v 1.5 2016/09/05 09:53:53 schwarze Exp $ | 1 | # $OpenBSD: Makefile,v 1.6 2017/07/27 15:08:37 bluhm Exp $ |
2 | 2 | ||
3 | .if defined(REGRESS_FULL) || make(clean) || make(cleandir) || make(obj) | 3 | SUBDIR = check_isw mbrtowc setlocale wcrtomb |
4 | SUBDIR+= check_isw | ||
5 | .endif | ||
6 | |||
7 | SUBDIR += mbrtowc setlocale wcrtomb | ||
8 | |||
9 | install: | ||
10 | 4 | ||
11 | .include <bsd.subdir.mk> | 5 | .include <bsd.subdir.mk> |
diff --git a/src/regress/lib/libc/locale/check_isw/Makefile b/src/regress/lib/libc/locale/check_isw/Makefile index 0885968fd1..cd79d6cb7f 100644 --- a/src/regress/lib/libc/locale/check_isw/Makefile +++ b/src/regress/lib/libc/locale/check_isw/Makefile | |||
@@ -1,9 +1,8 @@ | |||
1 | # $OpenBSD: Makefile,v 1.1 2005/08/11 21:57:02 espie Exp $ | 1 | # $OpenBSD: Makefile,v 1.2 2017/07/27 15:08:37 bluhm Exp $ |
2 | 2 | ||
3 | NOMAN= | 3 | PROG = check_isw |
4 | PROG=check_isw | ||
5 | 4 | ||
6 | run-regress-check_isw: ${PROG} | 5 | run-regress-${PROG}: ${PROG} |
7 | ./${PROG} >/dev/null | 6 | ./${PROG} >/dev/null |
8 | 7 | ||
9 | .include <bsd.regress.mk> | 8 | .include <bsd.regress.mk> |
diff --git a/src/regress/lib/libc/locale/check_isw/check_isw.c b/src/regress/lib/libc/locale/check_isw/check_isw.c index 9386267f61..718f387883 100644 --- a/src/regress/lib/libc/locale/check_isw/check_isw.c +++ b/src/regress/lib/libc/locale/check_isw/check_isw.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: check_isw.c,v 1.1 2005/08/11 21:57:02 espie Exp $ */ | 1 | /* $OpenBSD: check_isw.c,v 1.2 2017/07/27 15:08:37 bluhm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2005 Marc Espie <espie@openbsd.org> | 3 | * Copyright (c) 2005 Marc Espie <espie@openbsd.org> |
4 | * | 4 | * |
@@ -69,7 +69,7 @@ test1() | |||
69 | if (i % 8 == 7) | 69 | if (i % 8 == 7) |
70 | printf("\n"); | 70 | printf("\n"); |
71 | } | 71 | } |
72 | printf("%\n"); | 72 | printf("\n"); |
73 | } | 73 | } |
74 | 74 | ||
75 | void | 75 | void |
diff --git a/src/regress/lib/libc/locale/mbrtowc/Makefile b/src/regress/lib/libc/locale/mbrtowc/Makefile index 0aa1026e0a..5436383911 100644 --- a/src/regress/lib/libc/locale/mbrtowc/Makefile +++ b/src/regress/lib/libc/locale/mbrtowc/Makefile | |||
@@ -1,9 +1,5 @@ | |||
1 | # $OpenBSD: Makefile,v 1.1 2016/09/03 18:14:18 schwarze Exp $ | 1 | # $OpenBSD: Makefile,v 1.2 2017/07/27 15:08:37 bluhm Exp $ |
2 | 2 | ||
3 | PROG = test_mbrtowc | 3 | PROG = test_mbrtowc |
4 | NOMAN = | ||
5 | 4 | ||
6 | regress: ${PROG} | 5 | .include <bsd.regress.mk> |
7 | ./${PROG} | ||
8 | |||
9 | .include <bsd.prog.mk> | ||
diff --git a/src/regress/lib/libc/locale/mbrtowc/test_mbrtowc.c b/src/regress/lib/libc/locale/mbrtowc/test_mbrtowc.c index 5794791ffb..5926d25fd0 100644 --- a/src/regress/lib/libc/locale/mbrtowc/test_mbrtowc.c +++ b/src/regress/lib/libc/locale/mbrtowc/test_mbrtowc.c | |||
@@ -1,3 +1,4 @@ | |||
1 | /* $OpenBSD: test_mbrtowc.c,v 1.2 2017/07/27 15:08:37 bluhm Exp $ */ | ||
1 | /* | 2 | /* |
2 | * Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> | 3 | * Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> |
3 | * | 4 | * |
@@ -33,12 +34,12 @@ onetest(const char *name, const char *in, size_t insz, | |||
33 | 34 | ||
34 | sz = mbrtowc(&wc, in, insz, &mbs); | 35 | sz = mbrtowc(&wc, in, insz, &mbs); |
35 | if (errno != outerr) | 36 | if (errno != outerr) |
36 | err(1, "%d %s(%zd)", MB_CUR_MAX, name, insz); | 37 | err(1, "%zu %s(%zd)", MB_CUR_MAX, name, insz); |
37 | if (sz != outsz || (out != WEOF && wc != out)) | 38 | if (sz != outsz || (out != WEOF && wc != out)) |
38 | errx(1, "%d %s(%zd) = (%zd, %d) != (%zd, %d)", | 39 | errx(1, "%zu %s(%zd) = (%zd, %d) != (%zd, %d)", |
39 | MB_CUR_MAX, name, insz, sz, wc, outsz, out); | 40 | MB_CUR_MAX, name, insz, sz, wc, outsz, out); |
40 | if (mbsinit(&mbs) == (insz && outsz == (size_t)-2)) | 41 | if (mbsinit(&mbs) == (insz && outsz == (size_t)-2)) |
41 | errx(1, "%d %s(%zd) mbsinit", MB_CUR_MAX, name, insz); | 42 | errx(1, "%zu %s(%zd) mbsinit", MB_CUR_MAX, name, insz); |
42 | if (errno == 0 && outerr == 0) | 43 | if (errno == 0 && outerr == 0) |
43 | return; | 44 | return; |
44 | errno = 0; | 45 | errno = 0; |
diff --git a/src/regress/lib/libc/locale/setlocale/Makefile b/src/regress/lib/libc/locale/setlocale/Makefile index d0e7f07770..966f7926e5 100644 --- a/src/regress/lib/libc/locale/setlocale/Makefile +++ b/src/regress/lib/libc/locale/setlocale/Makefile | |||
@@ -1,9 +1,8 @@ | |||
1 | # $OpenBSD: Makefile,v 1.1 2015/07/07 17:38:53 semarie Exp $ | 1 | # $OpenBSD: Makefile,v 1.2 2017/07/27 15:08:37 bluhm Exp $ |
2 | 2 | ||
3 | NOMAN = | ||
4 | PROG = setlocale | 3 | PROG = setlocale |
5 | 4 | ||
6 | run-regress-setlocale: ${PROG} | 5 | run-regress-${PROG}: ${PROG} |
7 | env -i LC_ALL=fr_FR.UTF-8 ./${PROG} | 6 | env -i LC_ALL=fr_FR.UTF-8 ./${PROG} |
8 | 7 | ||
9 | .include <bsd.regress.mk> | 8 | .include <bsd.regress.mk> |
diff --git a/src/regress/lib/libc/locale/wcrtomb/Makefile b/src/regress/lib/libc/locale/wcrtomb/Makefile index 5179cd5668..b09cecc454 100644 --- a/src/regress/lib/libc/locale/wcrtomb/Makefile +++ b/src/regress/lib/libc/locale/wcrtomb/Makefile | |||
@@ -1,9 +1,5 @@ | |||
1 | # $OpenBSD: Makefile,v 1.1 2016/09/04 09:38:02 schwarze Exp $ | 1 | # $OpenBSD: Makefile,v 1.2 2017/07/27 15:08:37 bluhm Exp $ |
2 | 2 | ||
3 | PROG = test_wcrtomb | 3 | PROG = test_wcrtomb |
4 | NOMAN = | ||
5 | 4 | ||
6 | regress: ${PROG} | 5 | .include <bsd.regress.mk> |
7 | ./${PROG} | ||
8 | |||
9 | .include <bsd.prog.mk> | ||
diff --git a/src/regress/lib/libc/locale/wcrtomb/test_wcrtomb.c b/src/regress/lib/libc/locale/wcrtomb/test_wcrtomb.c index 6539d9f1bd..26b21fdd5b 100644 --- a/src/regress/lib/libc/locale/wcrtomb/test_wcrtomb.c +++ b/src/regress/lib/libc/locale/wcrtomb/test_wcrtomb.c | |||
@@ -1,3 +1,4 @@ | |||
1 | /* $OpenBSD: test_wcrtomb.c,v 1.2 2017/07/27 15:08:37 bluhm Exp $ */ | ||
1 | /* | 2 | /* |
2 | * Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> | 3 | * Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> |
3 | * | 4 | * |
@@ -35,13 +36,13 @@ onetest(const char *name, const wchar_t wcin, int outerr, const char *out) | |||
35 | outsz = out == NULL ? (size_t)-1 : *out == '\0' ? 1 : strlen(out); | 36 | outsz = out == NULL ? (size_t)-1 : *out == '\0' ? 1 : strlen(out); |
36 | sz = wcrtomb(buf, wcin, &mbs); | 37 | sz = wcrtomb(buf, wcin, &mbs); |
37 | if (errno != outerr) | 38 | if (errno != outerr) |
38 | err(1, "%d %s U+%04X", MB_CUR_MAX, name, wcin); | 39 | err(1, "%zu %s U+%04X", MB_CUR_MAX, name, wcin); |
39 | if (sz != outsz || (out != NULL && strncmp(buf, out, sz))) | 40 | if (sz != outsz || (out != NULL && strncmp(buf, out, sz))) |
40 | errx(1, "%d %s U+%04X: %4.4s(%zd) != %4.4s(%zd)", | 41 | errx(1, "%zu %s U+%04X: %4.4s(%zd) != %4.4s(%zd)", |
41 | MB_CUR_MAX, name, wcin, buf, sz, | 42 | MB_CUR_MAX, name, wcin, buf, sz, |
42 | out == NULL ? "(NULL)" : out, outsz); | 43 | out == NULL ? "(NULL)" : out, outsz); |
43 | if (mbsinit(&mbs) == 0) | 44 | if (mbsinit(&mbs) == 0) |
44 | errx(1, "%d %s U+%04X mbsinit", MB_CUR_MAX, name, wcin); | 45 | errx(1, "%zu %s U+%04X mbsinit", MB_CUR_MAX, name, wcin); |
45 | if (errno == 0 && outerr == 0) | 46 | if (errno == 0 && outerr == 0) |
46 | return; | 47 | return; |
47 | errno = 0; | 48 | errno = 0; |
diff --git a/src/regress/lib/libc/malloc/malloc_ulimit1/malloc_ulimit1.c b/src/regress/lib/libc/malloc/malloc_ulimit1/malloc_ulimit1.c index 99e805e8e1..94f7eb16b5 100644 --- a/src/regress/lib/libc/malloc/malloc_ulimit1/malloc_ulimit1.c +++ b/src/regress/lib/libc/malloc/malloc_ulimit1/malloc_ulimit1.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: malloc_ulimit1.c,v 1.2 2006/05/16 05:47:13 otto Exp $ */ | 1 | /* $OpenBSD: malloc_ulimit1.c,v 1.3 2017/07/27 15:08:37 bluhm Exp $ */ |
2 | 2 | ||
3 | /* Public Domain, 2006, Otto Moerbeek <otto@drijf.net> */ | 3 | /* Public Domain, 2006, Otto Moerbeek <otto@drijf.net> */ |
4 | 4 | ||
@@ -22,6 +22,7 @@ | |||
22 | #define STARTI 1300 | 22 | #define STARTI 1300 |
23 | #define FACTOR 1024 | 23 | #define FACTOR 1024 |
24 | 24 | ||
25 | int | ||
25 | main() | 26 | main() |
26 | { | 27 | { |
27 | struct rlimit lim; | 28 | struct rlimit lim; |
diff --git a/src/regress/lib/libc/malloc/malloc_ulimit2/malloc_ulimit2.c b/src/regress/lib/libc/malloc/malloc_ulimit2/malloc_ulimit2.c index ca8e8f438a..9510649090 100644 --- a/src/regress/lib/libc/malloc/malloc_ulimit2/malloc_ulimit2.c +++ b/src/regress/lib/libc/malloc/malloc_ulimit2/malloc_ulimit2.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: malloc_ulimit2.c,v 1.2 2006/05/16 05:47:13 otto Exp $ */ | 1 | /* $OpenBSD: malloc_ulimit2.c,v 1.3 2017/07/27 15:08:37 bluhm Exp $ */ |
2 | 2 | ||
3 | /* Public Domain, 2006, Otto Moerbeek <otto@drijf.net> */ | 3 | /* Public Domain, 2006, Otto Moerbeek <otto@drijf.net> */ |
4 | 4 | ||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #define FACTOR 1024 | 12 | #define FACTOR 1024 |
13 | 13 | ||
14 | int | ||
14 | main() | 15 | main() |
15 | { | 16 | { |
16 | struct rlimit lim; | 17 | struct rlimit lim; |
diff --git a/src/regress/lib/libc/sprintf/Makefile b/src/regress/lib/libc/sprintf/Makefile index 47bab9cdd3..514d795f2f 100644 --- a/src/regress/lib/libc/sprintf/Makefile +++ b/src/regress/lib/libc/sprintf/Makefile | |||
@@ -1,10 +1,7 @@ | |||
1 | # $OpenBSD: Makefile,v 1.1 2003/05/15 04:23:49 deraadt Exp $ | 1 | # $OpenBSD: Makefile,v 1.2 2017/07/27 15:08:37 bluhm Exp $ |
2 | 2 | ||
3 | NOMAN= | 3 | PROG = sprintf_test |
4 | PROG=sprintf_test | 4 | CFLAGS = -Wno-format |
5 | CPPFLAGS+=-I${.CURDIR}/../../../../lib/libc | 5 | CPPFLAGS = -I${.CURDIR}/../../../../lib/libc |
6 | |||
7 | run-regress-atexit_test: ${PROG} | ||
8 | ./${PROG} | ||
9 | 6 | ||
10 | .include <bsd.regress.mk> | 7 | .include <bsd.regress.mk> |
diff --git a/src/regress/lib/libc/telldir/utils.c b/src/regress/lib/libc/telldir/utils.c index 6a4101aba3..7fb0401d70 100644 --- a/src/regress/lib/libc/telldir/utils.c +++ b/src/regress/lib/libc/telldir/utils.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: utils.c,v 1.1 2013/11/03 00:20:24 schwarze Exp $ */ | 1 | /* $OpenBSD: utils.c,v 1.2 2017/07/27 15:08:37 bluhm Exp $ */ |
2 | 2 | ||
3 | /* Written by Otto Moerbeek, 2006, Public domain. */ | 3 | /* Written by Otto Moerbeek, 2006, Public domain. */ |
4 | 4 | ||
@@ -39,7 +39,7 @@ delfiles(void) | |||
39 | dp = opendir("d"); | 39 | dp = opendir("d"); |
40 | if (dp == NULL) | 40 | if (dp == NULL) |
41 | err(1, "opendir"); | 41 | err(1, "opendir"); |
42 | while (f = readdir(dp)) { | 42 | while ((f = readdir(dp))) { |
43 | if (strcmp(f->d_name, ".") == 0 || | 43 | if (strcmp(f->d_name, ".") == 0 || |
44 | strcmp(f->d_name, "..") == 0) | 44 | strcmp(f->d_name, "..") == 0) |
45 | continue; | 45 | continue; |
diff --git a/src/regress/lib/libc/vis/vis_test.c b/src/regress/lib/libc/vis/vis_test.c index 61c6edbd37..92f2cee32d 100644 --- a/src/regress/lib/libc/vis/vis_test.c +++ b/src/regress/lib/libc/vis/vis_test.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: vis_test.c,v 1.4 2015/07/20 01:52:28 millert Exp $ */ | 1 | /* $OpenBSD: vis_test.c,v 1.5 2017/07/27 15:08:37 bluhm Exp $ */ |
2 | 2 | ||
3 | /* Public domain. 2005, Otto Moerbeek */ | 3 | /* Public domain. 2005, Otto Moerbeek */ |
4 | 4 | ||
@@ -81,7 +81,8 @@ main(int argc, char *argv[]) | |||
81 | } | 81 | } |
82 | } else if (o > strlen(ibuf) * 4) { | 82 | } else if (o > strlen(ibuf) * 4) { |
83 | dotitle(i, j); | 83 | dotitle(i, j); |
84 | printf("wants too much %d %d\n", o, strlen(ibuf) * 4); | 84 | printf("wants too much %zd %zu\n", |
85 | o, strlen(ibuf) * 4); | ||
85 | continue; | 86 | continue; |
86 | } | 87 | } |
87 | 88 | ||
@@ -94,7 +95,8 @@ main(int argc, char *argv[]) | |||
94 | fail = 1; | 95 | fail = 1; |
95 | } else if (r != strlen(ibuf)) { | 96 | } else if (r != strlen(ibuf)) { |
96 | dotitle(i, j); | 97 | dotitle(i, j); |
97 | printf("rlen %d != inlen %d\n", r, strlen(ibuf)); | 98 | printf("rlen %zd != inlen %zu\n", |
99 | r, strlen(ibuf)); | ||
98 | printf("%s\n", obuf); | 100 | printf("%s\n", obuf); |
99 | printf("%s\n", rbuf); | 101 | printf("%s\n", rbuf); |
100 | fail = 1; | 102 | fail = 1; |