Skip to content

Commit ee63d40

Browse files
griwesbrycelelbach
authored andcommitted
Silence an MSVC warning that only triggers when this branch is not taken.
Bug 200513211
1 parent f422c73 commit ee63d40

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

testing/random.cu

+10-2
Original file line numberDiff line numberDiff line change
@@ -766,12 +766,20 @@ template<typename Distribution, typename Validator>
766766
// test Distribution with same range as engine
767767

768768
// test host
769-
thrust::generate(h.begin(), h.end(), Validator(Distribution(Engine::min, Engine::max)));
769+
THRUST_DISABLE_MSVC_WARNING_BEGIN(4305)
770+
thrust::generate(h.begin(), h.end(), Validator(
771+
Distribution(Engine::min, Engine::max)
772+
));
773+
THRUST_DISABLE_MSVC_WARNING_END(4305)
770774

771775
ASSERT_EQUAL(true, h[0]);
772776

773777
// test device
774-
thrust::generate(d.begin(), d.end(), Validator(Distribution(Engine::min, Engine::max)));
778+
THRUST_DISABLE_MSVC_WARNING_BEGIN(4305)
779+
thrust::generate(d.begin(), d.end(), Validator(
780+
Distribution(Engine::min, Engine::max)
781+
));
782+
THRUST_DISABLE_MSVC_WARNING_END(4305)
775783

776784
ASSERT_EQUAL(true, d[0]);
777785

0 commit comments

Comments
 (0)