From 2dfd12680847330ddef2fabb340fca10d082a5da Mon Sep 17 00:00:00 2001 From: "Adam C. Emerson" Date: Fri, 17 Jul 2020 02:36:06 -0400 Subject: [PATCH] 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 --- src/test/common/test_random.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/test/common/test_random.cc b/src/test/common/test_random.cc index 667b69c789ee4..490f8d5476f59 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; -- 2.39.5