]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/random: Turn off spurious warning
authorAdam C. Emerson <aemerson@redhat.com>
Fri, 17 Jul 2020 06:36:06 +0000 (02:36 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Fri, 17 Jul 2020 18:18:17 +0000 (14:18 -0400)
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 <aemerson@redhat.com>
src/test/common/test_random.cc

index 667b69c789ee4c7b9442e6255b488c8cf51a7e4e..490f8d5476f59cf9dabadb7e08cc4799faf30312 100644 (file)
@@ -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;