[pstl][NFC] Remove some warnings
llvm-svn: 356945
GitOrigin-RevId: 65bd5d8aa3b72f9db6e6c0c8f7a66b8bd9e61bb8
diff --git a/include/pstl/internal/parallel_backend_tbb.h b/include/pstl/internal/parallel_backend_tbb.h
index fb621f2..cf6319a 100644
--- a/include/pstl/internal/parallel_backend_tbb.h
+++ b/include/pstl/internal/parallel_backend_tbb.h
@@ -233,7 +233,7 @@
sum() const
{
__TBB_ASSERT(_M_has_sum, "sum expected");
- return *(_Tp*)_M_sum_storage;
+ return *const_cast<_Tp*>(reinterpret_cast<_Tp const*>(_M_sum_storage));
}
void
diff --git a/include/pstl/internal/unseq_backend_simd.h b/include/pstl/internal/unseq_backend_simd.h
index 7bd5a44..a1d3cee 100644
--- a/include/pstl/internal/unseq_backend_simd.h
+++ b/include/pstl/internal/unseq_backend_simd.h
@@ -456,7 +456,7 @@
typename std::enable_if<!is_arithmetic_plus<_Tp, _BinaryOperation>::value, _Tp>::type
simd_transform_reduce(_Size __n, _Tp __init, _BinaryOperation __binary_op, _UnaryOperation __f) noexcept
{
- const std::size_t __block_size = __lane_size / sizeof(_Tp);
+ const _Size __block_size = __lane_size / sizeof(_Tp);
if (__n > 2 * __block_size && __block_size > 1)
{
alignas(__lane_size) char __lane_[__lane_size];