From owner-dev-commits-src-branches@freebsd.org Thu Apr 22 11:08:30 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 662EA5EBD6B; Thu, 22 Apr 2021 11:08:30 +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 4FQvmZ02htz3khV; Thu, 22 Apr 2021 11:08:30 +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 121FD18D17; Thu, 22 Apr 2021 11:08:29 +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 13MB8SmQ088606; Thu, 22 Apr 2021 11:08:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13MB8SWA088605; Thu, 22 Apr 2021 11:08:28 GMT (envelope-from git) Date: Thu, 22 Apr 2021 11:08:28 GMT Message-Id: <202104221108.13MB8SWA088605@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alex Richardson Subject: git: b38293b480c3 - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: b38293b480c324544535bb8efa4033e76f894d1a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 11:08:31 -0000 The branch stable/13 has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=b38293b480c324544535bb8efa4033e76f894d1a commit b38293b480c324544535bb8efa4033e76f894d1a Author: Alex Richardson AuthorDate: 2021-02-25 14:28:17 +0000 Commit: Alex Richardson CommitDate: 2021-04-22 09:43:24 +0000 lib/msun: Allow building tests with WARNS=6 The only change needed is to mark a few variables as static. (cherry picked from commit 87d65c747a4389901c2bbbcb1ec4878b2df7b32c) --- 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"