diff --git a/testing/memory.cu b/testing/memory.cu index 622b06a0a..e4c1da8f6 100644 --- a/testing/memory.cu +++ b/testing/memory.cu @@ -92,7 +92,7 @@ get_temporary_buffer(my_new_temporary_allocation_system, std::ptrdiff_t) } template -void return_temporary_buffer(my_new_temporary_allocation_system, Pointer p) +void return_temporary_buffer(my_new_temporary_allocation_system, Pointer) { // This should never be called (the three-argument with size overload below // should be preferred) and shouldn't be ambiguous. diff --git a/thrust/random/detail/normal_distribution_base.h b/thrust/random/detail/normal_distribution_base.h index 2a3bd4470..94b966351 100644 --- a/thrust/random/detail/normal_distribution_base.h +++ b/thrust/random/detail/normal_distribution_base.h @@ -46,12 +46,12 @@ template __host__ __device__ RealType sample(UniformRandomNumberGenerator &urng, const RealType mean, const RealType stddev) { - typedef typename UniformRandomNumberGenerator::result_type uint_type; - const uint_type urng_range = UniformRandomNumberGenerator::max - UniformRandomNumberGenerator::min; + using uint_type = typename UniformRandomNumberGenerator::result_type; + constexpr uint_type urng_range = UniformRandomNumberGenerator::max - UniformRandomNumberGenerator::min; // Constants for conversion - const RealType S1 = static_cast(1) / urng_range; - const RealType S2 = S1 / 2; + constexpr RealType S1 = static_cast(1. / static_cast(urng_range)); + constexpr RealType S2 = S1 / 2; RealType S3 = static_cast(-1.4142135623730950488016887242097); // -sqrt(2) diff --git a/thrust/system/tbb/detail/merge.inl b/thrust/system/tbb/detail/merge.inl index bcc728546..a85bee163 100644 --- a/thrust/system/tbb/detail/merge.inl +++ b/thrust/system/tbb/detail/merge.inl @@ -225,7 +225,7 @@ template -OutputIterator merge(execution_policy &exec, +OutputIterator merge(execution_policy &, InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, @@ -254,7 +254,7 @@ template thrust::pair - merge_by_key(execution_policy &exec, + merge_by_key(execution_policy &, InputIterator1 keys_first1, InputIterator1 keys_last1, InputIterator2 keys_first2, diff --git a/thrust/system/tbb/detail/reduce.inl b/thrust/system/tbb/detail/reduce.inl index 22a13f63d..bef54f5e2 100644 --- a/thrust/system/tbb/detail/reduce.inl +++ b/thrust/system/tbb/detail/reduce.inl @@ -100,7 +100,7 @@ template - OutputType reduce(execution_policy &exec, + OutputType reduce(execution_policy &, InputIterator begin, InputIterator end, OutputType init,