summaryrefslogtreecommitdiffstats
path: root/pstl/test/std/numerics/numeric.ops/transform_reduce.pass.cpp
diff options
context:
space:
mode:
authorLouis Dionne <ldionne@apple.com>2019-06-19 20:15:50 +0000
committerLouis Dionne <ldionne@apple.com>2019-06-19 20:15:50 +0000
commit3491119f9ba466ed871a789eb91e3b7577e36272 (patch)
tree1afc4af7d6e98ed44edfdd033ac50026bd0b5e74 /pstl/test/std/numerics/numeric.ops/transform_reduce.pass.cpp
parentf46f41411b1fa1360fb13235df77e60c8b6e8992 (diff)
downloadbcm5719-llvm-3491119f9ba466ed871a789eb91e3b7577e36272.tar.gz
bcm5719-llvm-3491119f9ba466ed871a789eb91e3b7577e36272.zip
[pstl] Remove warnings in tests and headers
Mostly unused parameter, unused local typedefs and shadowed declarations. This massaging it necessary if we want to be able to run the tests under the libc++ lit configuration. llvm-svn: 363872
Diffstat (limited to 'pstl/test/std/numerics/numeric.ops/transform_reduce.pass.cpp')
-rw-r--r--pstl/test/std/numerics/numeric.ops/transform_reduce.pass.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/pstl/test/std/numerics/numeric.ops/transform_reduce.pass.cpp b/pstl/test/std/numerics/numeric.ops/transform_reduce.pass.cpp
index 4065e722309..0262bbd5a21 100644
--- a/pstl/test/std/numerics/numeric.ops/transform_reduce.pass.cpp
+++ b/pstl/test/std/numerics/numeric.ops/transform_reduce.pass.cpp
@@ -73,7 +73,7 @@ CheckResults(const T& expected, const T& in)
// We need to check correctness only for "int" (for example) except cases
// if we have "floating-point type"-specialization
void
-CheckResults(const float32_t& expected, const float32_t& in)
+CheckResults(const float32_t&, const float32_t&)
{
}
@@ -83,7 +83,7 @@ struct test_transform_reduce
template <typename Policy, typename InputIterator1, typename InputIterator2, typename T, typename BinaryOperation1,
typename BinaryOperation2, typename UnaryOp>
void
- operator()(Policy&& exec, InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2,
+ operator()(Policy&& exec, InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2,
T init, BinaryOperation1 opB1, BinaryOperation2 opB2, UnaryOp opU)
{
@@ -118,16 +118,16 @@ int32_t
main()
{
test_by_type<int32_t>(42, std::plus<int32_t>(), std::multiplies<int32_t>(), std::negate<int32_t>(),
- [](std::size_t a) -> int32_t { return int32_t(rand() % 1000); });
+ [](std::size_t) -> int32_t { return int32_t(rand() % 1000); });
test_by_type<int64_t>(0, [](const int64_t& a, const int64_t& b) -> int64_t { return a | b; }, XOR(),
[](const int64_t& x) -> int64_t { return x * 2; },
- [](std::size_t a) -> int64_t { return int64_t(rand() % 1000); });
+ [](std::size_t) -> int64_t { return int64_t(rand() % 1000); });
test_by_type<float32_t>(1.0f, std::multiplies<float32_t>(),
[](const float32_t& a, const float32_t& b) -> float32_t { return a + b; },
[](const float32_t& x) -> float32_t { return x + 2; },
- [](std::size_t a) -> float32_t { return rand() % 1000; });
+ [](std::size_t) -> float32_t { return rand() % 1000; });
test_by_type<MyClass>(MyClass(), std::plus<MyClass>(), std::multiplies<MyClass>(), std::negate<MyClass>(),
- [](std::size_t a) -> MyClass { return MyClass(rand() % 1000); });
+ [](std::size_t) -> MyClass { return MyClass(rand() % 1000); });
std::cout << done() << std::endl;
return 0;
OpenPOWER on IntegriCloud