diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-12-23 23:37:52 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-12-23 23:37:52 +0000 |
commit | fd838227411f3ce1fa348f1d334266231bbcc84d (patch) | |
tree | 204de9a3dad8b79d83bba224d8f6d4775169483f /libcxx/test/std/numerics | |
parent | 16166a4d71fca27f454a0837465143700dd41e98 (diff) | |
download | bcm5719-llvm-fd838227411f3ce1fa348f1d334266231bbcc84d.tar.gz bcm5719-llvm-fd838227411f3ce1fa348f1d334266231bbcc84d.zip |
Fix unused parameters and variables
llvm-svn: 290459
Diffstat (limited to 'libcxx/test/std/numerics')
18 files changed, 11 insertions, 28 deletions
diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp index e09163a7057..03ed727cab8 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp @@ -35,7 +35,6 @@ test() void test_edges() { typedef std::complex<double> C; - const double pi = std::atan2(+0., -0.); const unsigned N = sizeof(testcases) / sizeof(testcases[0]); for (unsigned i = 0; i < N; ++i) { diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp index 0fd9cf79bcb..a2c55390f2a 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp @@ -35,7 +35,6 @@ test() void test_edges() { typedef std::complex<double> C; - const double pi = std::atan2(+0., -0.); const unsigned N = sizeof(testcases) / sizeof(testcases[0]); for (unsigned i = 0; i < N; ++i) { diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/log10.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/log10.pass.cpp index 58286904ae2..8eb72006a1a 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/log10.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/log10.pass.cpp @@ -34,7 +34,6 @@ test() void test_edges() { - const double pi = std::atan2(+0., -0.); const unsigned N = sizeof(testcases) / sizeof(testcases[0]); for (unsigned i = 0; i < N; ++i) { diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp index 157246947cf..0d039a159e4 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp @@ -36,7 +36,6 @@ test() void test_edges() { - const double pi = std::atan2(+0., -0.); const unsigned N = sizeof(testcases) / sizeof(testcases[0]); for (unsigned i = 0; i < N; ++i) { diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp index 0752ea59f55..36a2962218d 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp @@ -36,7 +36,6 @@ test() void test_edges() { - const double pi = std::atan2(+0., -0.); const unsigned N = sizeof(testcases) / sizeof(testcases[0]); for (unsigned i = 0; i < N; ++i) { diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp index aedeec8caac..74a3857e932 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp @@ -36,7 +36,6 @@ test() void test_edges() { - const double pi = std::atan2(+0., -0.); const unsigned N = sizeof(testcases) / sizeof(testcases[0]); for (unsigned i = 0; i < N; ++i) { diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp index e1b98ecd067..7ae59980b09 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp @@ -35,7 +35,6 @@ test() void test_edges() { typedef std::complex<double> C; - const double pi = std::atan2(+0., -0.); const unsigned N = sizeof(testcases) / sizeof(testcases[0]); for (unsigned i = 0; i < N; ++i) { diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp index 20f2e71b140..491f3fac573 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp @@ -35,7 +35,6 @@ test() void test_edges() { typedef std::complex<double> C; - const double pi = std::atan2(+0., -0.); const unsigned N = sizeof(testcases) / sizeof(testcases[0]); for (unsigned i = 0; i < N; ++i) { diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp index 041a7814d03..9f09ab5827d 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp @@ -36,7 +36,6 @@ test() void test_edges() { typedef std::complex<double> C; - const double pi = std::atan2(+0., -0.); const unsigned N = sizeof(testcases) / sizeof(testcases[0]); for (unsigned i = 0; i < N; ++i) { diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp index 9a2276a8b75..8fa419c2179 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp @@ -35,7 +35,6 @@ test() void test_edges() { typedef std::complex<double> C; - const double pi = std::atan2(+0., -0.); const unsigned N = sizeof(testcases) / sizeof(testcases[0]); for (unsigned i = 0; i < N; ++i) { diff --git a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.assign/slice_array.pass.cpp b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.assign/slice_array.pass.cpp index 72275e01e1b..60b94ab5fc9 100644 --- a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.assign/slice_array.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.assign/slice_array.pass.cpp @@ -45,7 +45,6 @@ int main() // Test return value of assignment. { int a1[] = {0, 1, 2}; - int a2[] = {3, 4, 3}; std::valarray<int> v1(a1, 3); std::slice_array<int> s1 = v1[std::slice(1, 1, 1)]; std::slice_array<int> s2 = v1[std::slice(0, 1, 1)]; diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/swap.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/swap.pass.cpp index 2fcdc973041..b2b55fdc3c4 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/swap.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/swap.pass.cpp @@ -41,7 +41,6 @@ int main() typedef int T; T a1[] = {1, 2, 3, 4, 5}; const unsigned N1 = sizeof(a1)/sizeof(a1[0]); - const unsigned N2 = 0; std::valarray<T> v1(a1, N1); std::valarray<T> v2; std::valarray<T> v1_save = v1; @@ -57,7 +56,6 @@ int main() { typedef int T; T a2[] = {6, 7, 8, 9, 10, 11, 12}; - const unsigned N1 = 0; const unsigned N2 = sizeof(a2)/sizeof(a2[0]); std::valarray<T> v1; std::valarray<T> v2(a2, N2); @@ -73,8 +71,6 @@ int main() } { typedef int T; - const unsigned N1 = 0; - const unsigned N2 = 0; std::valarray<T> v1; std::valarray<T> v2; std::valarray<T> v1_save = v1; diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.special/swap.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.special/swap.pass.cpp index bd845ce6ef7..cb1807bf380 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.special/swap.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.special/swap.pass.cpp @@ -43,7 +43,6 @@ int main() typedef int T; T a1[] = {1, 2, 3, 4, 5}; const unsigned N1 = sizeof(a1)/sizeof(a1[0]); - const unsigned N2 = 0; std::valarray<T> v1(a1, N1); std::valarray<T> v2; std::valarray<T> v1_save = v1; @@ -59,7 +58,6 @@ int main() { typedef int T; T a2[] = {6, 7, 8, 9, 10, 11, 12}; - const unsigned N1 = 0; const unsigned N2 = sizeof(a2)/sizeof(a2[0]); std::valarray<T> v1; std::valarray<T> v2(a2, N2); @@ -75,8 +73,6 @@ int main() } { typedef int T; - const unsigned N1 = 0; - const unsigned N2 = 0; std::valarray<T> v1; std::valarray<T> v2; std::valarray<T> v1_save = v1; diff --git a/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp index cde9db4ba12..af065b84d1b 100644 --- a/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp @@ -44,7 +44,7 @@ constexpr bool test0(Input1 in1, Input2 in2, Output out) template <typename Input1, typename Input2 = Input1> -constexpr bool do_test(int dummy = 0) +constexpr bool do_test(int = 0) { using S1 = typename std::make_signed<Input1>::type; using S2 = typename std::make_signed<Input2>::type; diff --git a/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp index 3eb7b7df3a4..cd03d99ebf1 100644 --- a/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp @@ -43,7 +43,7 @@ constexpr bool test0(Input1 in1, Input2 in2, Output out) template <typename Input1, typename Input2 = Input1> -constexpr bool do_test(int dummy = 0) +constexpr bool do_test(int = 0) { using S1 = typename std::make_signed<Input1>::type; using S2 = typename std::make_signed<Input2>::type; diff --git a/libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp b/libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp index ff9285b28da..730576844a0 100644 --- a/libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp @@ -49,6 +49,8 @@ void check_random_device_invalid(const std::string &token) { LIBCPP_ASSERT(false); } catch (const std::system_error&) { } +#else + ((void)token); #endif } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp index 9e46c6e4360..de5b153e0d1 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp @@ -187,7 +187,7 @@ test4() kurtosis += d2 * d2; } var /= u.size(); - double dev = std::sqrt(var); + //double dev = std::sqrt(var); // In this case: // skew computes to 0./0. == nan // kurtosis computes to 0./0. == nan @@ -236,7 +236,7 @@ test5() kurtosis += d2 * d2; } var /= u.size(); - double dev = std::sqrt(var); +// double dev = std::sqrt(var); // In this case: // skew computes to 0./0. == nan // kurtosis computes to 0./0. == nan @@ -389,7 +389,7 @@ test9() kurtosis += d2 * d2; } var /= u.size(); - double dev = std::sqrt(var); +// double dev = std::sqrt(var); // In this case: // skew computes to 0./0. == nan // kurtosis computes to 0./0. == nan @@ -438,7 +438,7 @@ test10() kurtosis += d2 * d2; } var /= u.size(); - double dev = std::sqrt(var); +// double dev = std::sqrt(var); // In this case: // skew computes to 0./0. == nan // kurtosis computes to 0./0. == nan @@ -487,7 +487,7 @@ test11() kurtosis += d2 * d2; } var /= u.size(); - double dev = std::sqrt(var); +// double dev = std::sqrt(var); // In this case: // skew computes to 0./0. == nan // kurtosis computes to 0./0. == nan diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp index d9aaec38e38..17503364e03 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp @@ -193,8 +193,8 @@ test4() kurtosis -= 3; double x_mean = d.k() * (1 - d.p()) / d.p(); double x_var = x_mean / d.p(); - double x_skew = (2 - d.p()) / std::sqrt(d.k() * (1 - d.p())); - double x_kurtosis = 6. / d.k() + sqr(d.p()) / (d.k() * (1 - d.p())); +// double x_skew = (2 - d.p()) / std::sqrt(d.k() * (1 - d.p())); +// double x_kurtosis = 6. / d.k() + sqr(d.p()) / (d.k() * (1 - d.p())); assert(mean == x_mean); assert(var == x_var); } |