From f21c3d9881ca66549e77b2b4c471eef460085288 Mon Sep 17 00:00:00 2001 From: Yunsong Wang Date: Fri, 29 Dec 2023 14:38:10 -0800 Subject: [PATCH] Get rid of unused var warnings --- tests/static_map/shared_memory_test.cu | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tests/static_map/shared_memory_test.cu b/tests/static_map/shared_memory_test.cu index d2444c23a..fb4c017c9 100644 --- a/tests/static_map/shared_memory_test.cu +++ b/tests/static_map/shared_memory_test.cu @@ -123,7 +123,9 @@ TEMPLATE_TEST_CASE_SIG("Shared memory static map", } thrust::device_vector d_refs(h_refs); - auto constexpr num_windows = cuco::experimental::make_window_extent(extent_type{}); + // maybe_unused to silence false positive "variable set but not used" warning + [[maybe_unused]] auto constexpr num_windows = + cuco::experimental::make_window_extent(extent_type{}); shared_memory_test_kernel <<>>(d_refs.data().get(), @@ -152,7 +154,9 @@ TEMPLATE_TEST_CASE_SIG("Shared memory static map", } thrust::device_vector d_refs(h_refs); - auto constexpr num_windows = cuco::experimental::make_window_extent(extent_type{}); + // maybe_unused to silence false positive "variable set but not used" warning + [[maybe_unused]] auto constexpr num_windows = + cuco::experimental::make_window_extent(extent_type{}); shared_memory_test_kernel <<>>(d_refs.data().get(), @@ -211,9 +215,11 @@ __global__ void shared_memory_hash_table_kernel(bool* key_found) TEST_CASE("static map shared memory slots.", "") { - constexpr std::size_t N = 256; - auto constexpr num_windows = cuco::experimental::make_window_extent( - cuco::experimental::extent{}); + constexpr std::size_t N = 256; + // maybe_unused to silence false positive "variable set but not used" warning + [[maybe_unused]] auto constexpr num_windows = + cuco::experimental::make_window_extent( + cuco::experimental::extent{}); thrust::device_vector key_found(N, false); shared_memory_hash_table_kernel<<<8, 32>>>(key_found.data().get());