From: Adam C. Emerson Date: Fri, 17 Jul 2020 06:36:06 +0000 (-0400) Subject: test/random: Turn off spurious warning X-Git-Tag: v16.1.0~1661^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2dfd12680847330ddef2fabb340fca10d082a5da;p=ceph.git test/random: Turn off spurious warning Since we're testing deduction guides involving a type whose concrete representation is unknown, this warning provides no value. Signed-off-by: Adam C. Emerson --- diff --git a/src/test/common/test_random.cc b/src/test/common/test_random.cc index 667b69c789ee..490f8d5476f5 100644 --- a/src/test/common/test_random.cc +++ b/src/test/common/test_random.cc @@ -197,7 +197,13 @@ TEST(util, test_random_class_interface) // Test deduction guides: { { ceph::util::random_number_generator rng(1234); } +#pragma clang diagnostic push + // Turn this warning off, since we're checking that the deduction + // guide works. (And we don't know what the seed type will + // actually be.) +#pragma clang diagnostic ignored "-Wliteral-conversion" { ceph::util::random_number_generator rng(1234.1234); } +#pragma clang diagnostic pop { int x = 1234;