Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-43738

clang-tidy error in shard_key_pattern_test.cpp

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.3.1
    • None
    • Testing Infrastructure
    • None
    • Fully Compatible
    • ALL
    • Execution Team 2019-10-07
    • 50

    Description

      [2019/09/27 14:52:31.512] /data/mci/f7b2a6acdc3d01ded6cc8f0f20c1760d/src/src/mongo/s/shard_key_pattern_test.cpp:45:5: error: object destroyed immediately after creation; did you mean to name the object? [bugprone-unused-raii,-warnings-as-errors]
       [2019/09/27 14:52:31.512]     ShardKeyPattern(BSON("a" << 1));
       [2019/09/27 14:52:31.512]     ^              ~
       [2019/09/27 14:52:31.512]                     give_me_a_name
       [2019/09/27 14:52:31.512] /data/mci/f7b2a6acdc3d01ded6cc8f0f20c1760d/src/src/mongo/s/shard_key_pattern_test.cpp:46:5: error: object destroyed immediately after creation; did you mean to name the object? [bugprone-unused-raii,-warnings-as-errors]
       [2019/09/27 14:52:31.512]     ShardKeyPattern(BSON("a" << 1.0f));
       [2019/09/27 14:52:31.512]     ^              ~
       [2019/09/27 14:52:31.512]                     give_me_a_name
       [2019/09/27 14:52:31.513] /data/mci/f7b2a6acdc3d01ded6cc8f0f20c1760d/src/src/mongo/s/shard_key_pattern_test.cpp:47:5: error: object destroyed immediately after creation; did you mean to name the object? [bugprone-unused-raii,-warnings-as-errors]
       [2019/09/27 14:52:31.513]     ShardKeyPattern(BSON("a" << (long long)1L));
       [2019/09/27 14:52:31.513]     ^              ~
       [2019/09/27 14:52:31.513]                     give_me_a_name
       [2019/09/27 14:52:31.513] /data/mci/f7b2a6acdc3d01ded6cc8f0f20c1760d/src/src/mongo/s/shard_key_pattern_test.cpp:48:5: error: object destroyed immediately after creation; did you mean to name the object? [bugprone-unused-raii,-warnings-as-errors]
       [2019/09/27 14:52:31.513]     ShardKeyPattern(BSON("a"
       [2019/09/27 14:52:31.513]     ^              ~
       [2019/09/27 14:52:31.513]                     give_me_a_name
       [2019/09/27 14:52:31.513] /data/mci/f7b2a6acdc3d01ded6cc8f0f20c1760d/src/src/mongo/s/shard_key_pattern_test.cpp:65:5: error: object destroyed immediately after creation; did you mean to name the object? [bugprone-unused-raii,-warnings-as-errors]
       [2019/09/27 14:52:31.513]     ShardKeyPattern(BSON("a" << 1 << "b" << 1));
       [2019/09/27 14:52:31.513]     ^              ~
       [2019/09/27 14:52:31.513]                     give_me_a_name
       [2019/09/27 14:52:31.513] /data/mci/f7b2a6acdc3d01ded6cc8f0f20c1760d/src/src/mongo/s/shard_key_pattern_test.cpp:66:5: error: object destroyed immediately after creation; did you mean to name the object? [bugprone-unused-raii,-warnings-as-errors]
       [2019/09/27 14:52:31.513]     ShardKeyPattern(BSON("a" << 1.0f << "b" << 1.0));
       [2019/09/27 14:52:31.513]     ^              ~
       [2019/09/27 14:52:31.513]                     give_me_a_name
       [2019/09/27 14:52:31.513] /data/mci/f7b2a6acdc3d01ded6cc8f0f20c1760d/src/src/mongo/s/shard_key_pattern_test.cpp:67:5: error: object destroyed immediately after creation; did you mean to name the object? [bugprone-unused-raii,-warnings-as-errors]
       [2019/09/27 14:52:31.513]     ShardKeyPattern(BSON("a" << 1 << "b" << 1.0 << "c" << 1.0f));
       [2019/09/27 14:52:31.513]     ^              ~
       [2019/09/27 14:52:31.513]                     give_me_a_name
       [2019/09/27 14:52:31.513] /data/mci/f7b2a6acdc3d01ded6cc8f0f20c1760d/src/src/mongo/s/shard_key_pattern_test.cpp:78:5: error: object destroyed immediately after creation; did you mean to name the object? [bugprone-unused-raii,-warnings-as-errors]
       [2019/09/27 14:52:31.513]     ShardKeyPattern(BSON("a.b" << 1));
       [2019/09/27 14:52:31.513]     ^              ~
       [2019/09/27 14:52:31.513]                     give_me_a_name
       [2019/09/27 14:52:31.513] /data/mci/f7b2a6acdc3d01ded6cc8f0f20c1760d/src/src/mongo/s/shard_key_pattern_test.cpp:79:5: error: object destroyed immediately after creation; did you mean to name the object? [bugprone-unused-raii,-warnings-as-errors]
       [2019/09/27 14:52:31.513]     ShardKeyPattern(BSON("a.b.c.d" << 1.0));
       [2019/09/27 14:52:31.513]     ^              ~
       [2019/09/27 14:52:31.513]                     give_me_a_name
       [2019/09/27 14:52:31.513] /data/mci/f7b2a6acdc3d01ded6cc8f0f20c1760d/src/src/mongo/s/shard_key_pattern_test.cpp:80:5: error: object destroyed immediately after creation; did you mean to name the object? [bugprone-unused-raii,-warnings-as-errors]
       [2019/09/27 14:52:31.513]     ShardKeyPattern(BSON("a" << 1 << "c.d" << 1.0 << "e.f.g" << 1.0f));
       [2019/09/27 14:52:31.513]     ^              ~
       [2019/09/27 14:52:31.513]                     give_me_a_name
       [2019/09/27 14:52:31.513] /data/mci/f7b2a6acdc3d01ded6cc8f0f20c1760d/src/src/mongo/s/shard_key_pattern_test.cpp:81:5: error: object destroyed immediately after creation; did you mean to name the object? [bugprone-unused-raii,-warnings-as-errors]
       [2019/09/27 14:52:31.513]     ShardKeyPattern(BSON("a" << 1 << "a.b" << 1.0 << "a.b.c" << 1.0f));
       [2019/09/27 14:52:31.513]     ^              ~
       [2019/09/27 14:52:31.513]                     give_me_a_name
      

      Attachments

        Activity

          People

            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            suganthi.mani@mongodb.com Suganthi Mani
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: