From owner-dev-commits-src-all@freebsd.org Mon Mar 22 12:00:28 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 728935ABD43; Mon, 22 Mar 2021 12:00:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F3tNq4ktBz3H2L; Mon, 22 Mar 2021 12:00:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6BF94527B; Mon, 22 Mar 2021 12:00:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 12MC0R1I055126; Mon, 22 Mar 2021 12:00:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 12MC0Rja055125; Mon, 22 Mar 2021 12:00:27 GMT (envelope-from git) Date: Mon, 22 Mar 2021 12:00:27 GMT Message-Id: <202103221200.12MC0Rja055125@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 87d65c747a43 - main - lib/msun: Allow building tests with WARNS=6 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 87d65c747a4389901c2bbbcb1ec4878b2df7b32c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Mar 2021 12:00:28 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=87d65c747a4389901c2bbbcb1ec4878b2df7b32c commit 87d65c747a4389901c2bbbcb1ec4878b2df7b32c Author: Alex Richardson AuthorDate: 2021-02-25 14:28:17 +0000 Commit: Alex Richardson CommitDate: 2021-03-22 11:55:07 +0000 lib/msun: Allow building tests with WARNS=6 The only change needed is to mark a few variables as static. --- contrib/netbsd-tests/lib/libm/t_ldexp.c | 19 +++++++++---------- contrib/netbsd-tests/lib/libm/t_precision.c | 4 ++-- contrib/netbsd-tests/lib/libm/t_round.c | 2 +- contrib/netbsd-tests/lib/libm/t_scalbn.c | 2 +- lib/msun/tests/Makefile | 2 +- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/contrib/netbsd-tests/lib/libm/t_ldexp.c b/contrib/netbsd-tests/lib/libm/t_ldexp.c index 977b2219873b..40c69206e741 100644 --- a/contrib/netbsd-tests/lib/libm/t_ldexp.c +++ b/contrib/netbsd-tests/lib/libm/t_ldexp.c @@ -53,7 +53,7 @@ struct ldexp_test { const char *result; }; -struct ldexp_test ldexp_basic[] = { +static struct ldexp_test ldexp_basic[] = { { 1.0, 5, SKIP, " 32" }, { 1.0, 1022, SKIP, "4.4942328371557897693233e+307" }, { 1.0, 1023, -1, "4.4942328371557897693233e+307" }, @@ -71,7 +71,7 @@ struct ldexp_test ldexp_basic[] = { { 0, 0, 0, NULL } }; -struct ldexp_test ldexp_zero[] = { +static struct ldexp_test ldexp_zero[] = { { 0.0, -1, SKIP, " 0" }, { 0.0, 0, SKIP, " 0" }, { 0.0, 1, SKIP, " 0" }, @@ -82,7 +82,7 @@ struct ldexp_test ldexp_zero[] = { { 0, 0, 0, NULL } }; -struct ldexp_test ldexp_infinity[] = { +static struct ldexp_test ldexp_infinity[] = { { 1.0, 1024, -1, " inf" }, { 1.0, 1024, 0, " inf" }, { 1.0, 1024, 1, " inf" }, @@ -92,7 +92,7 @@ struct ldexp_test ldexp_infinity[] = { { 0, 0, 0, NULL } }; -struct ldexp_test ldexp_overflow[] = { +static struct ldexp_test ldexp_overflow[] = { { 1.0, 1024, SKIP, " inf" }, { 1.0, 1023, 1, " inf" }, { 1.0, -1022, 2046, " inf" }, @@ -106,7 +106,7 @@ struct ldexp_test ldexp_overflow[] = { { 0, 0, 0, NULL } }; -struct ldexp_test ldexp_denormal[] = { +static struct ldexp_test ldexp_denormal[] = { { 1.0, -1023, SKIP, "1.1125369292536006915451e-308" }, { 1.0, -1022, -1, "1.1125369292536006915451e-308" }, { 1.0, 1023, -2046, "1.1125369292536006915451e-308" }, @@ -120,7 +120,7 @@ struct ldexp_test ldexp_denormal[] = { { 0, 0, 0, NULL } }; -struct ldexp_test ldexp_underflow[] = { +static struct ldexp_test ldexp_underflow[] = { { 1.0, -1075, SKIP, " 0" }, { 1.0, -1074, -1, " 0" }, { 1.0, 1023, -2098, " 0" }, @@ -132,7 +132,7 @@ struct ldexp_test ldexp_underflow[] = { { 0, 0, 0, NULL } }; -struct ldexp_test ldexp_denormal_large[] = { +static struct ldexp_test ldexp_denormal_large[] = { { 1.0, -1028, 1024, " 0.0625" }, { 1.0, -1028, 1025, " 0.125" }, { 1.0, -1028, 1026, " 0.25" }, @@ -177,10 +177,9 @@ run_test(struct ldexp_test *table) v = ldexp(v, table->exp2); (void)snprintf(outbuf, sizeof(outbuf), FORMAT, v); - ATF_CHECK_STREQ_MSG(table->result, outbuf, - "Entry %zu:\n\tExp: \"%s\"\n\tAct: \"%s\"", - i, table->result, outbuf); + "Entry %zu:\n\tExp: \"%s\"\n\tAct: \"%s\"/%a", + i, table->result, outbuf, v); } } diff --git a/contrib/netbsd-tests/lib/libm/t_precision.c b/contrib/netbsd-tests/lib/libm/t_precision.c index eb8e29546eb6..b953845c21f4 100644 --- a/contrib/netbsd-tests/lib/libm/t_precision.c +++ b/contrib/netbsd-tests/lib/libm/t_precision.c @@ -44,9 +44,9 @@ ATF_TC_HEAD(t_precision, tc) "Basic precision test for double and long double"); } -volatile double x = 1; +static volatile double x = 1; #if __HAVE_LONG_DOUBLE -volatile long double y = 1; +static volatile long double y = 1; #endif ATF_TC_BODY(t_precision, tc) diff --git a/contrib/netbsd-tests/lib/libm/t_round.c b/contrib/netbsd-tests/lib/libm/t_round.c index 7d32586f1aa5..bafc894943ce 100644 --- a/contrib/netbsd-tests/lib/libm/t_round.c +++ b/contrib/netbsd-tests/lib/libm/t_round.c @@ -117,7 +117,7 @@ ATF_TC_HEAD(rounding_alpha_simple, tc) } -double rounding_alpha_simple_even = 9223372036854775808.000000; /* 2^63 */ +static double rounding_alpha_simple_even = 9223372036854775808.000000; /* 2^63 */ ATF_TC_BODY(rounding_alpha_simple, tc) { diff --git a/contrib/netbsd-tests/lib/libm/t_scalbn.c b/contrib/netbsd-tests/lib/libm/t_scalbn.c index f6adaaa993ec..dce07aac3c78 100644 --- a/contrib/netbsd-tests/lib/libm/t_scalbn.c +++ b/contrib/netbsd-tests/lib/libm/t_scalbn.c @@ -49,7 +49,7 @@ struct testcase { int error; int except; }; -struct testcase test_vals[] = { +static struct testcase test_vals[] = { { 0, 1.00085, 1.00085, 0, 0 }, { 0, 0.99755, 0.99755, 0, 0 }, { 0, -1.00085, -1.00085, 0, 0 }, diff --git a/lib/msun/tests/Makefile b/lib/msun/tests/Makefile index 309f49c6dddd..4ef25c0a909a 100644 --- a/lib/msun/tests/Makefile +++ b/lib/msun/tests/Makefile @@ -88,7 +88,7 @@ SRCS.ilogb2_test= ilogb_test.c LIBADD+= m -WARNS?= 1 +WARNS?= 6 # Copied from lib/msun/Makefile .if ${MACHINE_CPUARCH} == "i386"