diff options
author | Louis Dionne <ldionne@apple.com> | 2019-05-30 20:46:31 +0000 |
---|---|---|
committer | Louis Dionne <ldionne@apple.com> | 2019-05-30 20:46:31 +0000 |
commit | 5c4c44310a38ff77e15585636da57a66e737570d (patch) | |
tree | 6b969b713f66bcbbb6650fae8772bc4aba63b2c4 /pstl | |
parent | a481b01e958b19c2eb6564ab8930eae9058967f8 (diff) | |
download | llvm-5c4c44310a38ff77e15585636da57a66e737570d.zip llvm-5c4c44310a38ff77e15585636da57a66e737570d.tar.gz llvm-5c4c44310a38ff77e15585636da57a66e737570d.tar.bz2 |
[pstl] Remove various warnings in the pstl headers and tests
- unused parameter warnings
- don't use single-letter template parameter names, like we do in libc++
- sign-comparison warnings
- unused variables in the tests
- unused local typedefs in the tests
- the use of #include_next
- field reordering in the tests
- unused lambda captures
Note that the rationale for why the static_casts to unsigned are OK is
that last - first must always be non-negative, since [first, last) is
a valid range.
llvm-svn: 362148
Diffstat (limited to 'pstl')
14 files changed, 57 insertions, 53 deletions
diff --git a/pstl/include/pstl/internal/algorithm_impl.h b/pstl/include/pstl/internal/algorithm_impl.h index 5fecef4..7706656 100644 --- a/pstl/include/pstl/internal/algorithm_impl.h +++ b/pstl/include/pstl/internal/algorithm_impl.h @@ -599,19 +599,19 @@ _RandomAccessIterator __find_subrange(_RandomAccessIterator __first, _RandomAccessIterator __last, _RandomAccessIterator __global_last, _Size __count, const _Tp& __value, _BinaryPredicate __pred, _IsVector __is_vector) noexcept { - if (__global_last - __first < __count || __count < 1) + if (static_cast<_Size>(__global_last - __first) < __count || __count < 1) { return __last; // According to the standard last shall be returned when count < 1 } auto __n = __global_last - __first; auto __unary_pred = __equal_value_by_pred<_Tp, _BinaryPredicate>(__value, __pred); - while (__first != __last && (__global_last - __first >= __count)) + while (__first != __last && (static_cast<_Size>(__global_last - __first) >= __count)) { __first = __internal::__brick_find_if(__first, __last, __unary_pred, __is_vector); // check that all of elements in [first+1, first+count) equal to value - if (__first != __last && (__global_last - __first >= __count) && + if (__first != __last && (static_cast<_Size>(__global_last - __first) >= __count) && !__internal::__brick_any_of(__first + 1, __first + __count, __not_pred<decltype(__unary_pred)>(__unary_pred), __is_vector)) { @@ -2244,7 +2244,7 @@ __brick_adjacent_find(_ForwardIterator __first, _ForwardIterator __last, _Binary template <class _ForwardIterator, class _BinaryPredicate> _ForwardIterator __brick_adjacent_find(_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred, - /* IsVector = */ std::false_type, bool __or_semantic) noexcept + /* IsVector = */ std::false_type, bool) noexcept { return std::adjacent_find(__first, __last, __pred); } @@ -2689,7 +2689,7 @@ __pattern_inplace_merge(_ExecutionPolicy&& __exec, _BidirectionalIterator __firs template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Compare, class _IsVector> bool -__pattern_includes(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, +__pattern_includes(_ExecutionPolicy&&, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, _Compare __comp, _IsVector, /*is_parallel=*/std::false_type) noexcept { @@ -2699,7 +2699,7 @@ __pattern_includes(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _Forwa template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Compare, class _IsVector> bool __pattern_includes(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, - _ForwardIterator2 __first2, _ForwardIterator2 __last2, _Compare __comp, _IsVector __is_vector, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, _Compare __comp, _IsVector, /*is_parallel=*/std::true_type) { if (__first2 >= __last2) @@ -2761,7 +2761,7 @@ __parallel_set_op(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _Forwar _SizeFunction __size_func, _SetOP __set_op, _IsVector __is_vector) { typedef typename std::iterator_traits<_ForwardIterator1>::difference_type _DifferenceType; - typedef typename std::iterator_traits<_OutputIterator>::value_type _T; + typedef typename std::iterator_traits<_OutputIterator>::value_type _Tp; struct _SetRange { @@ -2776,7 +2776,7 @@ __parallel_set_op(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _Forwar const _DifferenceType __n1 = __last1 - __first1; const _DifferenceType __n2 = __last2 - __first2; - __par_backend::__buffer<_T> __buf(__size_func(__n1, __n2)); + __par_backend::__buffer<_Tp> __buf(__size_func(__n1, __n2)); return __internal::__except_handler([&__exec, __n1, __first1, __last1, __first2, __last2, __result, __is_vector, __comp, __size_func, __set_op, &__buf]() { @@ -3007,11 +3007,11 @@ __pattern_set_union(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _Forw if (__n1 + __n2 <= __set_algo_cut_off) return std::set_union(__first1, __last1, __first2, __last2, __result, __comp); - typedef typename std::iterator_traits<_OutputIterator>::value_type _T; + typedef typename std::iterator_traits<_OutputIterator>::value_type _Tp; return __internal::__parallel_set_union_op( std::forward<_ExecutionPolicy>(__exec), __first1, __last1, __first2, __last2, __result, __comp, [](_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, - _T* __result, + _Tp* __result, _Compare __comp) { return std::set_union(__first1, __last1, __first2, __last2, __result, __comp); }, __is_vector); } @@ -3056,7 +3056,7 @@ __pattern_set_intersection(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1 _ForwardIterator2 __first2, _ForwardIterator2 __last2, _OutputIterator __result, _Compare __comp, _IsVector __is_vector, /*is_parallel=*/std::true_type) { - typedef typename std::iterator_traits<_OutputIterator>::value_type _T; + typedef typename std::iterator_traits<_OutputIterator>::value_type _Tp; typedef typename std::iterator_traits<_ForwardIterator1>::difference_type _DifferenceType; const auto __n1 = __last1 - __first1; @@ -3086,7 +3086,7 @@ __pattern_set_intersection(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1 std::forward<_ExecutionPolicy>(__exec), __left_bound_seq_1, __last1, __first2, __last2, __result, __comp, [](_DifferenceType __n, _DifferenceType __m) { return std::min(__n, __m); }, [](_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, - _ForwardIterator2 __last2, _T* __result, _Compare __comp) { + _ForwardIterator2 __last2, _Tp* __result, _Compare __comp) { return std::set_intersection(__first1, __last1, __first2, __last2, __result, __comp); }, __is_vector); @@ -3100,7 +3100,7 @@ __pattern_set_intersection(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1 std::forward<_ExecutionPolicy>(__exec), __first1, __last1, __left_bound_seq_2, __last2, __result, __comp, [](_DifferenceType __n, _DifferenceType __m) { return std::min(__n, __m); }, [](_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, - _ForwardIterator2 __last2, _T* __result, _Compare __comp) { + _ForwardIterator2 __last2, _Tp* __result, _Compare __comp) { return std::set_intersection(__first2, __last2, __first1, __last1, __result, __comp); }, __is_vector); @@ -3151,7 +3151,7 @@ __pattern_set_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, _OutputIterator __result, _Compare __comp, _IsVector __is_vector, /*is_parallel=*/std::true_type) { - typedef typename std::iterator_traits<_OutputIterator>::value_type _T; + typedef typename std::iterator_traits<_OutputIterator>::value_type _Tp; typedef typename std::iterator_traits<_ForwardIterator1>::difference_type _DifferenceType; const auto __n1 = __last1 - __first1; @@ -3195,9 +3195,9 @@ __pattern_set_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, if (__n1 + __n2 > __set_algo_cut_off) return __internal::__parallel_set_op( std::forward<_ExecutionPolicy>(__exec), __first1, __last1, __first2, __last2, __result, __comp, - [](_DifferenceType __n, _DifferenceType __m) { return __n; }, + [](_DifferenceType __n, _DifferenceType) { return __n; }, [](_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, - _ForwardIterator2 __last2, _T* __result, + _ForwardIterator2 __last2, _Tp* __result, _Compare __comp) { return std::set_difference(__first1, __last1, __first2, __last2, __result, __comp); }, __is_vector); @@ -3254,11 +3254,11 @@ __pattern_set_symmetric_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 if (__n1 + __n2 <= __set_algo_cut_off) return std::set_symmetric_difference(__first1, __last1, __first2, __last2, __result, __comp); - typedef typename std::iterator_traits<_OutputIterator>::value_type _T; + typedef typename std::iterator_traits<_OutputIterator>::value_type _Tp; return __internal::__parallel_set_union_op( std::forward<_ExecutionPolicy>(__exec), __first1, __last1, __first2, __last2, __result, __comp, [](_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, - _T* __result, _Compare __comp) { + _Tp* __result, _Compare __comp) { return std::set_symmetric_difference(__first1, __last1, __first2, __last2, __result, __comp); }, __is_vector); diff --git a/pstl/include/pstl/internal/numeric_impl.h b/pstl/include/pstl/internal/numeric_impl.h index 1f108aa..8302afd 100644 --- a/pstl/include/pstl/internal/numeric_impl.h +++ b/pstl/include/pstl/internal/numeric_impl.h @@ -284,7 +284,7 @@ __pattern_transform_scan(_ExecutionPolicy&& __exec, _RandomAccessIterator __firs }) - 1); }, - [](_Tp __res) {}); + [](_Tp) {}); return __result + (__last - __first); }); } diff --git a/pstl/include/pstl/internal/parallel_backend_serial.h b/pstl/include/pstl/internal/parallel_backend_serial.h index e4b3a70..089f998 100644 --- a/pstl/include/pstl/internal/parallel_backend_serial.h +++ b/pstl/include/pstl/internal/parallel_backend_serial.h @@ -110,10 +110,10 @@ template <class _ExecutionPolicy, typename _RandomAccessIterator1, typename _Ran typename _RandomAccessIterator3, typename _Compare, typename _LeafMerge> void __parallel_merge(_ExecutionPolicy&&, _RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1, - _RandomAccessIterator2 __first2, _RandomAccessIterator2 __last2, _RandomAccessIterator3 __out, + _RandomAccessIterator2 __first2, _RandomAccessIterator2 __last2, _RandomAccessIterator3 __outit, _Compare __comp, _LeafMerge __leaf_merge) { - __leaf_merge(__first1, __last1, __first2, __last2, __out, __comp); + __leaf_merge(__first1, __last1, __first2, __last2, __outit, __comp); } template <class _ExecutionPolicy, typename _F1, typename _F2> diff --git a/pstl/include/pstl/internal/unseq_backend_simd.h b/pstl/include/pstl/internal/unseq_backend_simd.h index 464d747..a05de39 100644 --- a/pstl/include/pstl/internal/unseq_backend_simd.h +++ b/pstl/include/pstl/internal/unseq_backend_simd.h @@ -189,14 +189,14 @@ __simd_first(_Index1 __first1, _DifferenceType __n, _Index2 __first2, _Pred __pr } if (__found) { - _DifferenceType __i; + _DifferenceType __i2; // This will vectorize - for (__i = 0; __i < __block_size; ++__i) + for (__i2 = 0; __i2 < __block_size; ++__i2) { - if (__lane[__i]) + if (__lane[__i2]) break; } - return std::make_pair(__first1 + __i, __first2 + __i); + return std::make_pair(__first1 + __i2, __first2 + __i2); } __first1 += __block_size; __first2 += __block_size; @@ -486,15 +486,15 @@ __simd_transform_reduce(_Size __n, _Tp __init, _BinaryOperation __binary_op, _Un __lane[__j] = __binary_op(__lane[__j], __f(last_iteration + __j)); } // combiner - for (_Size __i = 0; __i < __block_size; ++__i) + for (_Size __j = 0; __j < __block_size; ++__j) { - __init = __binary_op(__init, __lane[__i]); + __init = __binary_op(__init, __lane[__j]); } // destroyer _PSTL_PRAGMA_SIMD - for (_Size __i = 0; __i < __block_size; ++__i) + for (_Size __j = 0; __j < __block_size; ++__j) { - __lane[__i].~_Tp(); + __lane[__j].~_Tp(); } } else diff --git a/pstl/include/pstl/internal/utils.h b/pstl/include/pstl/internal/utils.h index 1711f29..a1a0a7f 100644 --- a/pstl/include/pstl/internal/utils.h +++ b/pstl/include/pstl/internal/utils.h @@ -45,7 +45,7 @@ __invoke_if(std::true_type, _Fp __f) template <typename _Fp> void -__invoke_if(std::false_type, _Fp __f) +__invoke_if(std::false_type, _Fp) { } @@ -58,20 +58,20 @@ __invoke_if_not(std::false_type, _Fp __f) template <typename _Fp> void -__invoke_if_not(std::true_type, _Fp __f) +__invoke_if_not(std::true_type, _Fp) { } template <typename _F1, typename _F2> typename std::result_of<_F1()>::type -__invoke_if_else(std::true_type, _F1 __f1, _F2 __f2) +__invoke_if_else(std::true_type, _F1 __f1, _F2) { return __f1(); } template <typename _F1, typename _F2> typename std::result_of<_F2()>::type -__invoke_if_else(std::false_type, _F1 __f1, _F2 __f2) +__invoke_if_else(std::false_type, _F1, _F2 __f2) { return __f2(); } diff --git a/pstl/test/CMakeLists.txt b/pstl/test/CMakeLists.txt index dae99e1..bc027c3 100644 --- a/pstl/test/CMakeLists.txt +++ b/pstl/test/CMakeLists.txt @@ -21,6 +21,7 @@ add_custom_target(check-pstl add_library(test_stdlib INTERFACE) target_include_directories(test_stdlib INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/support/stdlib") target_link_libraries(test_stdlib INTERFACE pstl::ParallelSTL) +target_compile_options(test_stdlib INTERFACE -Wno-gnu-include-next) file(GLOB_RECURSE UNIT_TESTS "*.pass.cpp") foreach(_file IN LISTS UNIT_TESTS) @@ -31,6 +32,7 @@ foreach(_file IN LISTS UNIT_TESTS) add_executable(${_target} EXCLUDE_FROM_ALL "${_file}") target_include_directories(${_target} PRIVATE "${CMAKE_CURRENT_LIST_DIR}") + target_compile_options(${_target} PRIVATE -Wno-unused-local-typedef -Wno-unused-variable) target_link_libraries(${_target} PRIVATE test_stdlib) set_target_properties(${_target} PROPERTIES CXX_EXTENSIONS NO RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") diff --git a/pstl/test/std/algorithms/alg.modifying.operations/generate.pass.cpp b/pstl/test/std/algorithms/alg.modifying.operations/generate.pass.cpp index 9b423df..185e98c 100644 --- a/pstl/test/std/algorithms/alg.modifying.operations/generate.pass.cpp +++ b/pstl/test/std/algorithms/alg.modifying.operations/generate.pass.cpp @@ -46,7 +46,8 @@ struct test_generate { Generator_count<T> g; generate(exec, first, last, g); - EXPECT_TRUE(std::count(first, last, g.default_value()) == n, "generate wrong result for generate"); + Size count = std::count(first, last, g.default_value()); + EXPECT_TRUE(count == n, "generate wrong result for generate"); std::fill(first, last, T(0)); } @@ -54,7 +55,8 @@ struct test_generate Generator_count<T> g; const auto m = n / 2; auto last = generate_n(exec, first, m, g); - EXPECT_TRUE(std::count(first, last, g.default_value()) == m && last == std::next(first, m), + Size count = std::count(first, last, g.default_value()); + EXPECT_TRUE(count == m && last == std::next(first, m), "generate_n wrong result for generate_n"); std::fill(first, last, T(0)); } diff --git a/pstl/test/std/algorithms/alg.nonmodifying/adjacent_find.pass.cpp b/pstl/test/std/algorithms/alg.nonmodifying/adjacent_find.pass.cpp index 1bccb53..b2ae541 100644 --- a/pstl/test/std/algorithms/alg.nonmodifying/adjacent_find.pass.cpp +++ b/pstl/test/std/algorithms/alg.nonmodifying/adjacent_find.pass.cpp @@ -39,12 +39,12 @@ test_adjacent_find_by_type() { size_t counts[] = {2, 3, 500}; - for (int32_t c = 0; c < const_size(counts); ++c) + for (size_t c = 0; c < const_size(counts); ++c) { - for (int32_t e = 0; e < (counts[c] >= 64 ? 64 : (counts[c] == 2 ? 1 : 2)); ++e) + for (size_t e = 0; e < (counts[c] >= 64 ? 64 : (counts[c] == 2 ? 1 : 2)); ++e) { - Sequence<T> in(counts[c], [](int32_t v) -> T { return T(v); }); //fill 0...n + Sequence<T> in(counts[c], [](size_t v) -> T { return T(v); }); //fill 0...n in[e] = in[e + 1] = -1; //make an adjacent pair auto i = std::adjacent_find(in.cbegin(), in.cend(), std::equal_to<T>()); @@ -56,9 +56,9 @@ test_adjacent_find_by_type() } //special cases: size=0, size=1; - for (int32_t expect = 0; expect < 1; ++expect) + for (size_t expect = 0; expect < 1; ++expect) { - Sequence<T> in(expect, [](int32_t v) -> T { return T(v); }); //fill 0...n + Sequence<T> in(expect, [](size_t v) -> T { return T(v); }); //fill 0...n auto i = std::adjacent_find(in.cbegin(), in.cend(), std::equal_to<T>()); EXPECT_TRUE(i == in.cbegin() + expect, "std::adjacent_find returned wrong result"); diff --git a/pstl/test/std/algorithms/alg.nonmodifying/equal.pass.cpp b/pstl/test/std/algorithms/alg.nonmodifying/equal.pass.cpp index ea4c09e..192babb 100644 --- a/pstl/test/std/algorithms/alg.nonmodifying/equal.pass.cpp +++ b/pstl/test/std/algorithms/alg.nonmodifying/equal.pass.cpp @@ -20,10 +20,10 @@ using namespace TestUtils; struct UserType { + size_t key; float32_t f; float64_t d; int32_t i; - size_t key; bool operator()(UserType a, UserType b) diff --git a/pstl/test/std/algorithms/alg.nonmodifying/find_end.pass.cpp b/pstl/test/std/algorithms/alg.nonmodifying/find_end.pass.cpp index dfe499c..466314e 100644 --- a/pstl/test/std/algorithms/alg.nonmodifying/find_end.pass.cpp +++ b/pstl/test/std/algorithms/alg.nonmodifying/find_end.pass.cpp @@ -68,8 +68,8 @@ test(const std::size_t bits) const std::size_t max_n1 = 1000; const std::size_t max_n2 = (max_n1 * 10) / 8; - Sequence<T> in(max_n1, [max_n1, bits](std::size_t k) { return T(2 * HashBits(max_n1, bits - 1) ^ 1); }); - Sequence<T> sub(max_n2, [max_n1, bits](std::size_t k) { return T(2 * HashBits(max_n1, bits - 1)); }); + Sequence<T> in(max_n1, [bits](std::size_t k) { return T(2 * HashBits(max_n1, bits - 1) ^ 1); }); + Sequence<T> sub(max_n2, [bits](std::size_t k) { return T(2 * HashBits(max_n1, bits - 1)); }); for (std::size_t n1 = 0; n1 <= max_n1; n1 = n1 <= 16 ? n1 + 1 : size_t(3.1415 * n1)) { std::size_t sub_n[] = {0, 1, 3, n1, (n1 * 10) / 8}; diff --git a/pstl/test/std/algorithms/alg.nonmodifying/search_n.pass.cpp b/pstl/test/std/algorithms/alg.nonmodifying/search_n.pass.cpp index 28fcb36..ac8a422 100644 --- a/pstl/test/std/algorithms/alg.nonmodifying/search_n.pass.cpp +++ b/pstl/test/std/algorithms/alg.nonmodifying/search_n.pass.cpp @@ -67,7 +67,7 @@ test() } for (auto r : res) { - Sequence<T> in(n1, [n1](std::size_t k) { return T(0); }); + Sequence<T> in(n1, [](std::size_t k) { return T(0); }); std::size_t i = r, isub = 0; for (; i < n1 & isub < n2; ++i, ++isub) in[i] = value; diff --git a/pstl/test/std/algorithms/alg.sorting/alg.set.operations/set.pass.cpp b/pstl/test/std/algorithms/alg.sorting/alg.set.operations/set.pass.cpp index dbe59d0..27e83a1 100644 --- a/pstl/test/std/algorithms/alg.sorting/alg.set.operations/set.pass.cpp +++ b/pstl/test/std/algorithms/alg.sorting/alg.set.operations/set.pass.cpp @@ -116,7 +116,7 @@ test_set(Compare compare) for (std::size_t m = 0; m < n_max; m = m <= 16 ? m + 1 : size_t(2.71828 * m)) { //prepare the input ranges - Sequence<T1> in1(n, [n](std::size_t k) { return rand() % (2 * k + 1); }); + Sequence<T1> in1(n, [](std::size_t k) { return rand() % (2 * k + 1); }); Sequence<T2> in2(m, [m](std::size_t k) { return (m % 2) * rand() + rand() % (k + 1); }); std::sort(in1.begin(), in1.end(), compare); diff --git a/pstl/test/std/algorithms/alg.sorting/sort.pass.cpp b/pstl/test/std/algorithms/alg.sorting/sort.pass.cpp index 1997ec5..2cdb24f 100644 --- a/pstl/test/std/algorithms/alg.sorting/sort.pass.cpp +++ b/pstl/test/std/algorithms/alg.sorting/sort.pass.cpp @@ -83,7 +83,7 @@ class ParanoidKey index = k.index; return *this; } - ParanoidKey(int32_t index, int32_t value, OddTag) : index(index), value(value) {} + ParanoidKey(int32_t index, int32_t value, OddTag) : value(value), index(index) {} ParanoidKey(ParanoidKey&& k) : value(k.value), index(k.index) { EXPECT_TRUE(k.isConstructed(), "source for move-construction is dead"); diff --git a/pstl/test/support/utils.h b/pstl/test/support/utils.h index 6547d93..541dc8c 100644 --- a/pstl/test/support/utils.h +++ b/pstl/test/support/utils.h @@ -30,7 +30,7 @@ typedef float float32_t; template <class T, std::size_t N> constexpr size_t -const_size(const T (&array)[N]) noexcept +const_size(const T (&)[N]) noexcept { return N; } @@ -119,7 +119,7 @@ expect_equal(Iterator1 expected_first, Iterator2 actual_first, Size n, const cha const char* message) { size_t error_count = 0; - for (size_t k = 0; k < n && error_count < 10; ++k, ++expected_first, ++actual_first) + for (Size k = 0; k < n && error_count < 10; ++k, ++expected_first, ++actual_first) { if (!(*expected_first == *actual_first)) { @@ -752,7 +752,7 @@ struct invoke_if_<std::false_type, std::false_type> { template <typename Op, typename... Rest> void - operator()(bool is_allow, Op op, Rest&&... rest) + operator()(bool, Op op, Rest&&... rest) { op(std::forward<Rest>(rest)...); } @@ -787,14 +787,14 @@ struct non_const_wrapper_tagged : non_const_wrapper template <typename Policy, typename Iterator> typename std::enable_if<IsPositiveCondition != is_same_iterator_category<Iterator, IteratorTag>::value, void>::type - operator()(Policy&& exec, Iterator iter) + operator()(Policy&&, Iterator) { } template <typename Policy, typename InputIterator, typename OutputIterator> typename std::enable_if<IsPositiveCondition != is_same_iterator_category<OutputIterator, IteratorTag>::value, void>::type - operator()(Policy&& exec, InputIterator input_iter, OutputIterator out_iter) + operator()(Policy&&, InputIterator, OutputIterator) { } }; @@ -999,7 +999,7 @@ struct iterator_invoker<std::forward_iterator_tag, /*isReverse=*/std::true_type> { template <typename... Rest> void - operator()(Rest&&... rest) + operator()(Rest&&...) { } }; @@ -1226,7 +1226,7 @@ test_algo_basic_double(F&& f) template <typename Policy, typename F> static void -invoke_if(Policy&& p, F f) +invoke_if(Policy&&, F f) { #if _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN || _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN __pstl::__internal::invoke_if_not(__pstl::__internal::allow_unsequenced<Policy>(), f); |