diff options
author | ngie <ngie@FreeBSD.org> | 2015-12-05 21:49:35 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2015-12-05 21:49:35 +0000 |
commit | 5e0ed4fa0a68fde14782f68c7461b8b95176515b (patch) | |
tree | 7ee2292c97b1b6b9a0064ff90fcd38f441a9828d /lib/libc/tests | |
parent | 11ddbfbc5cbb55d74dd49e7d13251e56cb1dff91 (diff) | |
download | FreeBSD-src-5e0ed4fa0a68fde14782f68c7461b8b95176515b.zip FreeBSD-src-5e0ed4fa0a68fde14782f68c7461b8b95176515b.tar.gz |
MFC r283801,r290846,r290851,r290856,r290860:
r283801 (by araujo):
Fix warning of implicit declaration of function 'mkdir'.
Differential Revision: D2662
Reviewed by: rodrigc, ngie
r290846:
Bump WARNS to 2
Sponsored by: EMC / Isilon Storage Division
r290851:
Change WARNS to 2 across the board with all the libc testcases
This effectively "reverts" r290846
Sponsored by: EMC / Isilon Storage Division
r290856 (by bapt):
also skip the definition of ':fopen_regular' to avoid the build to fail due to
unused variables defined by ATF macros
r290860 (by bapt):
Remove unused variables to fix building world
Diffstat (limited to 'lib/libc/tests')
-rw-r--r-- | lib/libc/tests/Makefile.netbsd-tests | 2 | ||||
-rw-r--r-- | lib/libc/tests/stdio/fmemopen2_test.c | 3 | ||||
-rw-r--r-- | lib/libc/tests/stdio/getdelim_test.c | 1 | ||||
-rw-r--r-- | lib/libc/tests/stdio/perror_test.c | 2 | ||||
-rw-r--r-- | lib/libc/tests/stdio/scanfloat_test.c | 9 |
5 files changed, 4 insertions, 13 deletions
diff --git a/lib/libc/tests/Makefile.netbsd-tests b/lib/libc/tests/Makefile.netbsd-tests index f364b1c..56472fb 100644 --- a/lib/libc/tests/Makefile.netbsd-tests +++ b/lib/libc/tests/Makefile.netbsd-tests @@ -4,4 +4,6 @@ OBJTOP?= ${.OBJDIR:H:H:H:H} SRCTOP?= ${.CURDIR:H:H:H:H} TESTSRC?= ${SRCTOP}/contrib/netbsd-tests/lib/libc/${.CURDIR:T} +WARNS?= 2 + .include <netbsd-tests.test.mk> diff --git a/lib/libc/tests/stdio/fmemopen2_test.c b/lib/libc/tests/stdio/fmemopen2_test.c index d4a14a8..62831fb 100644 --- a/lib/libc/tests/stdio/fmemopen2_test.c +++ b/lib/libc/tests/stdio/fmemopen2_test.c @@ -104,10 +104,9 @@ ATF_TC_WITHOUT_HEAD(test_autoalloc); ATF_TC_BODY(test_autoalloc, tc) { /* Let fmemopen allocate the buffer. */ - char str[] = "A quick test"; FILE *fp; long pos; - size_t nofw, nofr, i; + size_t nofw, i; int rc; /* Open a FILE * using fmemopen. */ diff --git a/lib/libc/tests/stdio/getdelim_test.c b/lib/libc/tests/stdio/getdelim_test.c index 890c74a..5ef589a 100644 --- a/lib/libc/tests/stdio/getdelim_test.c +++ b/lib/libc/tests/stdio/getdelim_test.c @@ -113,7 +113,6 @@ ATF_TC_BODY(getline_basic, tc) ATF_TC_WITHOUT_HEAD(stream_error); ATF_TC_BODY(stream_error, tc) { - FILE *fp; char *line; size_t linecap; diff --git a/lib/libc/tests/stdio/perror_test.c b/lib/libc/tests/stdio/perror_test.c index a58121c..989f1ff 100644 --- a/lib/libc/tests/stdio/perror_test.c +++ b/lib/libc/tests/stdio/perror_test.c @@ -48,7 +48,7 @@ static char tmpfil[PATH_MAX]; ATF_TC_WITHOUT_HEAD(perror_test); ATF_TC_BODY(perror_test, tc) { - char buf[512], lbuf[512]; + char lbuf[512]; int i; char *s; diff --git a/lib/libc/tests/stdio/scanfloat_test.c b/lib/libc/tests/stdio/scanfloat_test.c index 60c1b61..7e27e69 100644 --- a/lib/libc/tests/stdio/scanfloat_test.c +++ b/lib/libc/tests/stdio/scanfloat_test.c @@ -58,7 +58,6 @@ ATF_TC_BODY(normalized_numbers, tc) long double ld = 0.0; double d = 0.0; float f = 0.0; - char *endp; buf[0] = '\0'; ATF_REQUIRE(setlocale(LC_NUMERIC, "")); @@ -157,7 +156,6 @@ ATF_TC_BODY(infinities_and_nans, tc) long double ld = 0.0; double d = 0.0; float f = 0.0; - char *endp; ATF_REQUIRE(setlocale(LC_NUMERIC, "C")); @@ -205,11 +203,8 @@ ATF_TC_BODY(infinities_and_nans, tc) ATF_TC_WITHOUT_HEAD(rounding_tests); ATF_TC_BODY(rounding_tests, tc) { - char buf[128]; long double ld = 0.0; double d = 0.0; - float f = 0.0; - char *endp; ATF_REQUIRE(setlocale(LC_NUMERIC, "C")); @@ -287,10 +282,6 @@ ATF_TC_BODY(rounding_tests, tc) ATF_TC_WITHOUT_HEAD(strtod); ATF_TC_BODY(strtod, tc) { - char buf[128]; - long double ld = 0.0; - double d = 0.0; - float f = 0.0; char *endp; ATF_REQUIRE(setlocale(LC_NUMERIC, "C")); |